carb::tasking::ApplyBatchFn

Defined in carb/tasking/TaskingTypes.h

using carb::tasking::ApplyBatchFn = void (*)(size_t startIndex, size_t endIndex, void *taskArg)

The function executed by ITasking::applyRangeBatch()

Note

This function differs from ApplyFn in that it must handle a contiguous range of indexes determined by [startIndex, endIndex).

Warning

The item at index endIndex is not to be processed by this function. In other words, the range handled by this function is:

for (size_t i = startIndex; i != endIndex; ++i)
    array[i]->process();

Param startIndex

The initial index that must be handled by this function call.

Param endIndex

The after-the-end index representing the range of indexes that must be handled by this function call. The item at this index is after-the-end of the assigned range and must not be processed.

Param taskArg

The argument passed to ITasking::applyRangeBatch().