dng_area_task Class ReferenceAbstract class for rectangular processing operations with support for partitioning across multiple processing resources and observing memory constraints. More...
Inheritance diagram for dng_area_task:
![]()
Detailed DescriptionAbstract class for rectangular processing operations with support for partitioning across multiple processing resources and observing memory constraints.Member Function Documentation
Find tile size taking into account repeating tiles, unit cell, and maximum tile size.
References MaxTileSize(), RepeatingTile1(), RepeatingTile2(), RepeatingTile3(), and UnitCell(). Referenced by Perform().
Task computation finalization and teardown method. Called after all resources have completed processing. Can be overridden to accumulate results and free resources allocated in Start.
Referenced by Perform().
Getter for the maximum number of threads (resources) that can be used for processing
Getter for maximum size of a tile for processing. Often processing will need to allocate temporary buffers or use other resources that are either fixed or in limited supply. The maximum tile size forces further partitioning if the tile is bigger than this size.
Referenced by FindTileSize().
Getter for minimum area of a partitioned rectangle. Often it is not profitable to use more resources if it requires partitioning the input into chunks that are too small, as the overhead increases more than the speedup. This method can be ovreridden for a specific task to indicate the smallest area for partitioning. Default is 256x256 pixels.
Default resource partitioner that assumes a single resource to be used for processing. Implementations that are aware of multiple processing resources should override (replace) this method. This is usually done in dng_host::PerformAreaTask .
References FindTileSize(), Finish(), ProcessOnThread(), and Start(). Referenced by dng_host::PerformAreaTask().
Process one tile or fully partitioned area. This method is overridden by derived classes to implement the actual image processing. Note that the sniffer can be ignored if it is certain that a processing task will complete very quickly. This method should never be called directly but rather accessed via Process. There is no allocator parameter as all allocation should be done in Start.
Implemented in dng_filter_task. Referenced by ProcessOnThread().
Handle one resource's worth of partitioned tiles. Called after thread partitioning has already been done. Area may be further subdivided to handle maximum tile size, etc. It will be rare to override this method.
References Process(), RepeatingTile1(), RepeatingTile2(), RepeatingTile3(), and dng_abort_sniffer::SniffForAbort(). Referenced by Perform().
Getter for RepeatingTile1. RepeatingTile1, RepeatingTile2, and RepeatingTile3 are used to establish a set of 0 to 3 tile patterns for which the resulting partitions that the final Process method is called on will not cross tile boundaries in any of the tile patterns. This can be used for a processing routine that needs to read from two tiles and write to a third such that all the tiles are aligned and sized in a certain way. A RepeatingTile value is valid if it is non-empty. Higher numbered RepeatingTile patterns are only used if all lower ones are non-empty. A RepeatingTile pattern must be a multiple of UnitCell in size for all constraints of the partitionerr to be met. Referenced by FindTileSize(), and ProcessOnThread().
Getter for RepeatingTile2. RepeatingTile1, RepeatingTile2, and RepeatingTile3 are used to establish a set of 0 to 3 tile patterns for which the resulting partitions that the final Process method is called on will not cross tile boundaries in any of the tile patterns. This can be used for a processing routine that needs to read from two tiles and write to a third such that all the tiles are aligned and sized in a certain way. A RepeatingTile value is valid if it is non-empty. Higher numbered RepeatingTile patterns are only used if all lower ones are non-empty. A RepeatingTile pattern must be a multiple of UnitCell in size for all constraints of the partitionerr to be met. Referenced by FindTileSize(), and ProcessOnThread().
Getter for RepeatingTile3. RepeatingTile1, RepeatingTile2, and RepeatingTile3 are used to establish a set of 0 to 3 tile patterns for which the resulting partitions that the final Process method is called on will not cross tile boundaries in any of the tile patterns. This can be used for a processing routine that needs to read from two tiles and write to a third such that all the tiles are aligned and sized in a certain way. A RepeatingTile value is valid if it is non-empty. Higher numbered RepeatingTile patterns are only used if all lower ones are non-empty. A RepeatingTile pattern must be a multiple of UnitCell in size for all constraints of the partitionerr to be met. Referenced by FindTileSize(), and ProcessOnThread().
Task startup method called before any processing is done on partitions. The Start method is called before any processing is done and can be overridden to allocate temporary buffers, etc.
Reimplemented in dng_filter_task. Referenced by Perform().
Getter for dimensions of which partitioned tiles should be a multiple. Various methods of processing prefer certain alignments. The partitioning attempts to construct tiles such that the sizes are a multiple of the dimensions of this point.
Referenced by FindTileSize().
The documentation for this class was generated from the following files:
|