#include <parallelimage.h>
This is a utility class for parallel processing of 2d data - usually images. The per pixel computations are distributed to several threads. This is intended for time consuming computations, it makes no sense to call this to clear all pixels of an image.
Classes | |
struct | ImageData |
class | LineJob |
class | PixelJob |
class | TileJob |
Static Public Member Functions | |
template<typename WORKER > | |
static void | Process (Int width, Int height, Int tileSize, const WORKER &worker) |
Static Private Member Functions | |
template<typename WORKER > | |
static MAXON_ATTRIBUTE_NO_INLINE void | Fallback (Int width, Int height, const WORKER &worker) |
|
staticprivate |
Invokes the worker method for all pixels of the image (uses dynamic distribution).
[in] | width | Image width in pixels. |
[in] | height | Image height in pixels. |
[in] | tileSize | Initial tile size to be used (a tile will be tileSize pixels wide and tileSize pixels high) |
[in] | worker | Lambda or object with operator (), will be called for every pixel (concurrently from different threads) |
WORKER | A class containing an operator ()(Int x, Int y) used for the loop. |