Skip to content

Commit 90a55a5

Browse files
[SYCL][Docs] Invert group numbering for ballot groups (#12905)
The current extension for non-uniform groups state that ballot groups are numbered 0 if the predicate was true and 1 if the predicate was false. However, the implementation has the inverse numbering. This commit changes the extension to make the numbering consistent with the implementation, in turn making the group numbering directly convertible to a boolean value equal to the corresponding predicate. --------- Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 9fcb4c6 commit 90a55a5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sycl/doc/extensions/experimental/sycl_ext_oneapi_non_uniform_groups.asciidoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ id_type get_group_id() const;
337337
----
338338
_Returns_: An `id` representing the index of the ballot-group.
339339

340-
NOTE: This will always be either 0 (representing the group of work-items where
341-
the predicate was true) or 1 (representing the group of work-items where the
340+
NOTE: This will always be either 1 (representing the group of work-items where
341+
the predicate was true) or 0 (representing the group of work-items where the
342342
predicate was false).
343343

344344
[source,c++]
@@ -357,6 +357,8 @@ _Returns_: A `range` representing the number of ballot-groups.
357357
NOTE: This will always return a `range` of 2, as there will always be two groups;
358358
one representing the group of work-items where the predicate was true and
359359
another representing the group of work-items where the predicate was false.
360+
It is possible for one of these groups to contain no work-items, if the
361+
predicate has the same value on all work-items.
360362

361363
[source,c++]
362364
----

0 commit comments

Comments
 (0)