static ThreadIndex validThreadCount(int number)
Valid thread count from a given integer value.
TaskDeviceRequirement
Specifies which device (CPU and/or GPU) is used to run the task.
@ CPU_ONLY
this task does not use GPU
virtual TaskDeviceRequirement getUsedDevices() const
Communicates devices (CPU and/or GPU) the task is run on.
virtual void beforeProcessing(ThreadIndex threadCount, ProcessingTarget target, GraphicPipeline *gpu)
Instruction called before the task is executed.
virtual bool processOnGPU(GraphicPipeline &gpu, TaskThread &thread)
Executes the task on GPU.
virtual ThreadIndex getMaxThreads() const
Gives the upper limint on the number of threads the task may be performed by.
virtual void afterProcessing(ThreadIndex threadCount, GraphicPipeline *gpu, bool aborted)
Instruction called after the task is executed.
Internal low-level GPU control API.
unsigned char ThreadIndex
number of threads / thread index
static const ThreadIndex MAX_THREAD_INDEX
maximum possible thread index value