Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

kSize kParallelArgs_Begin | ( | const kParallelArgs * | args,
|  | kSize | start,
|  | kSize | count
| ) |  |

Helper method that can be used to calculate the data start index within a kParallel callback.

The kParallel class enables data processing to be distributed across multiple callbacks. This arrangement requires the dataset to be partitioned, with each callback performing a portion of the total required work.

Assuming that the dataset can be represented by a linear range (e.g., elements in an array), the kParallelArgs_Begin method can optionally be used to calculate the lower bound (start index) of the data to be processed in the current kParallel callback invocation.

Parameters

  args | Arguments received by a kParallel data processing callback.
  start | First index of the overall range to be collectively processed.
  count | Total count of elements to be collectively processed.

Returns
  Index of first element to be processed in this callback.