21 #include "../parallelism.h"
A very basic class for any image.
Task: an operation that can be executed by multiple threads in parallel.
Makes sure the bitmap content is accessible within an image processing task.
Internal low-level GPU control API.
Measures the difference between two bitmaps.
static float psnr(AbstractBitmap &bitmap1, AbstractBitmap &bitmap2)
ThreadIndex getMaxThreads() const
Gives the upper limint on the number of threads the task may be performed by.
bool process(TaskThread &thread)
Executes the task on CPU within a given thread.
void afterProcessing(ThreadIndex threadCount, GraphicPipeline *gpu, bool aborted)
Instruction called after the task is executed.
void setNorm(Norm norm)
Specifies the norm to use in the measurement.
void setBitmaps(AbstractBitmap *bitmap1, AbstractBitmap *bitmap2)
Sets input images.
AbstractBitmap * bitmap[2]
std::vector< double > results
void beforeProcessing(ThreadIndex threadCount, ProcessingTarget target, GraphicPipeline *gpu)
Instruction called before the task is executed.
Norm
Norm (distance) to measure between two images.
unsigned char ThreadIndex
number of threads / thread index
static const ThreadIndex MAX_THREAD_INDEX
maximum possible thread index value