Skip to content

Commit d314612

Browse files
committed
[NFCI][SYCL] Make get_group_id to return by reference
It will enforce address space to the return value helping to avoid invalid AS cast from local to private for sret argument that would appear after llvm/llvm-project#128166 and the related work. Signed-off-by: Sidorov, Dmitry <[email protected]>
1 parent b23d69e commit d314612

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/include/sycl/group.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ template <int Dimensions = 1> class __SYCL_TYPE(group) group {
120120
__SYCL2020_DEPRECATED("use sycl::group::get_group_id() instead")
121121
size_t get_id(int dimension) const { return index[dimension]; }
122122

123-
id<Dimensions> get_group_id() const { return index; }
123+
id<Dimensions> &get_group_id() { return index; }
124124

125125
size_t get_group_id(int dimension) const { return index[dimension]; }
126126

0 commit comments

Comments
 (0)