ParallelImage Class Reference 线程

#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

静态公共成员函数

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)

成员函数文档编制

◆  Fallback()

static MAXON_ATTRIBUTE_NO_INLINE void Fallback ( Int   width ,
Int   height ,
const WORKER &  worker  
)
static private

◆  Process()

static void Process ( Int   width ,
Int   height ,
Int   tileSize ,
const WORKER &  worker  
)
static

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)
Template Parameters
WORKER A class containing an operator ()(Int x, Int y) used for the loop.