Skip to content

Commit daff7cc

Browse files
authored
clarified out-of-range behavior for shuffle indices (#1384)
Clarified that the return value is undefined for out-of-range shuffle indices, not that behavior is undefined.
1 parent 0133db7 commit daff7cc

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

extensions/cl_intel_subgroups.asciidoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Final Draft
5050

5151
== Version
5252

53-
Built On: {docdate} +
54-
Revision: 8
53+
Built On: 2025-06-03 +
54+
Revision: 9
5555

5656
== Dependencies
5757

@@ -701,7 +701,7 @@ gentype intel_sub_group_shuffle(
701701
The data that is returned for this work item is the value of _data_ for the work item identified by _sub_group_local_id_.
702702

703703
_sub_group_local_id_ need not be the same value for all work items in the sub-group.
704-
There is no defined behavior for out-of-range _sub_group_local_ids_.
704+
The return value is undefined for out-of-range _sub_group_local_ids_.
705705

706706
|[source,c]
707707
----
@@ -721,7 +721,7 @@ If the shuffle index is less than the max_sub_group_size, the result of this bui
721721
If the shuffle index is greater than or equal to the max_sub_group_size but less than twice the max_sub_group_size, the result of this built-in function is the value of the _next_ data source for the work item with sub_group_local_id equal to the shuffle index minus the max_sub_group_size.
722722

723723
All other values of the shuffle index are considered to be out-of-range.
724-
There is no defined behavior for out-of-range indices.
724+
The return value is undefined for out-of-range indices.
725725

726726
_delta_ need not be the same value for all work items in the sub-group.
727727

@@ -743,7 +743,7 @@ If the shuffle index is greater than or equal to zero and less than the max_sub_
743743
If the shuffle index is less than zero but greater than or equal to the negative max_sub_group_size, the result of this built-in function is the value of the previous data source for the work item with sub_group_local_id equal to the shuffle index plus the max_sub_group_size.
744744

745745
All other values of the shuffle index are considered to be out-of-range.
746-
There is no defined behavior for out-of-range indices.
746+
The return value is undefined for out-of-range indices.
747747

748748
_delta_ need not be the same value for all work items in the sub-group.
749749

@@ -759,7 +759,7 @@ The data that is returned for this work item is the value of _data_ for the work
759759
If the result of the XOR is greater than max_sub_group_size then it is considered out-of-range.
760760

761761
_value_ need not be the same for all work items in the sub-group.
762-
There is no defined behavior for out-of-range indices.
762+
The return value is undefined for out-of-range indices.
763763

764764
|====
765765
--
@@ -951,6 +951,7 @@ None.
951951
|6|2018-12-02|Ben Ashbaugh|Added back a section that was inadvertently removed during conversion to asciidoc.
952952
|7|2019-01-15|Ben Ashbaugh|Fixed a typo in the summary section of new built-in functions.
953953
|8|2019-09-17|Ben Ashbaugh|Added vec3 types for shuffles, restriction for block reads and writes and partial sub-groups, and asciidoctor formatting fixes.
954+
|9|2025-06-03|Ben Ashbaugh|Clarified that the return value is undefined for out-of-range shuffle indices, not that behavior is undefined.
954955
|========================================
955956
956957
//************************************************************************

0 commit comments

Comments
 (0)