Skip to content

Commit 6774952

Browse files
authored
Clarify behavior of work_group_broadcast (#577)
* Clarify behavior of work_group_broadcast Fix an unrelated typo. Related to #169. Signed-off-by: Marco Antognini <marco.antognini@arm.com> * Improve specification and update sub_group_broadcast Signed-off-by: Marco Antognini <marco.antognini@arm.com> * Address typos Signed-off-by: Marco Antognini <marco.antognini@arm.com>
1 parent cee2487 commit 6774952

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

OpenCL_C.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9948,7 +9948,7 @@ NOTE: The functionality described in this section <<unified-spec, requires>>
99489948
support for OpenCL C 2.0, or OpenCL C 3.0 or newer and the
99499949
{opencl_c_work_group_collective_functions} feature.
99509950

9951-
This section decribes built-in functions that perform collective options
9951+
This section describes built-in functions that perform collective options
99529952
across a work-group.
99539953
These built-in functions must be encountered by all work-items in a
99549954
work-group executing the kernel.
@@ -9978,8 +9978,11 @@ footnote:[{fn-double-supported}] as the type for the arguments.
99789978
| Broadcast the value of _a_ for work-item identified by _local_id_ to
99799979
all work-items in the work-group.
99809980

9981-
_local_id_ must be the same value for all work-items in the
9982-
work-group.
9981+
Behavior is undefined when the value of _local_id_ is not equivalent for
9982+
all work-items in the work-group.
9983+
9984+
Behavior is undefined when _local_id_ is greater or equal to the
9985+
work-group size in the corresponding dimension.
99839986
| gentype *work_group_reduce_<op>*(gentype _x_)
99849987
| Return result of reduction operation specified by *<op>* for all
99859988
values of _x_ specified by work-items in a work-group.
@@ -11032,8 +11035,11 @@ footnote:[{fn-int64-supported}], `ulong`, `half` footnote:[{fn-half-supported}],
1103211035
_sub_group_local_id_ (value returned by *get_sub_group_local_id*) to all
1103311036
work-items in the subgroup.
1103411037

11035-
_sub_group_local_id_ must be the same value for all work-items in the
11036-
subgroup.
11038+
Behavior is undefined when the value of _sub_group_local_id_ is not
11039+
equivalent for all work-items in the subgroup.
11040+
11041+
Behavior is undefined when _sub_group_local_id_ is greater or equal to the
11042+
subgroup size.
1103711043

1103811044
| gentype *sub_group_reduce_<op>* ( +
1103911045
gentype _x_)

0 commit comments

Comments
 (0)