The vote/ballot functions communicate Boolean conditions between the work-items in a sub-group, and they enable developers to direct control-flow at the sub-group level: a work-item may take a branch if any work-item in its sub-group would do so; or it may exit a loop only after all work-items in its sub-group have finished.
Member function | Description |
---|---|
bool any(bool predicate) const | Returns true if predicate evaluates to true for any work-item in the sub-group. |
bool all(bool predicate) const | Returns true if predicate evaluates to true for all work-items in the sub-group. |