Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

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

Helper method that can be used to calculate the data end 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_End method can optionally be used to calculate the upper bound (end 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
  One greater than the index of the last element to be processed in this callback.