File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 99#include <clc/workitem/clc_get_num_sub_groups.h>
1010#include <libspirv/spirv.h>
1111
12- _CLC_DEF _CLC_OVERLOAD uint __spirv_BuiltInNumSubgroups () {
12+ _CLC_OVERLOAD _CLC_DEF uint __spirv_BuiltInNumSubgroups () {
1313 return __clc_get_num_sub_groups ();
1414}
Original file line number Diff line number Diff line change 66//
77//===----------------------------------------------------------------------===//
88
9- #include <clc/workitem/clc_get_global_id.h>
109#include <libspirv/spirv.h>
1110
1211extern int __nvvm_reflect_ocl (constant char * );
1312
1413_CLC_DEF _CLC_OVERLOAD size_t __spirv_BuiltInGlobalInvocationId (int dim ) {
1514 if (__nvvm_reflect_ocl ("__CUDA_ID_QUERIES_FIT_IN_INT" )) {
16- return (uint )__clc_get_global_id (dim );
15+ return (uint )__spirv_BuiltInWorkgroupId (dim ) *
16+ (uint )__spirv_BuiltInWorkgroupSize (dim ) +
17+ (uint )__spirv_BuiltInLocalInvocationId (dim ) +
18+ (uint )__spirv_BuiltInGlobalOffset (dim );
1719 }
18- return __clc_get_global_id (dim );
20+ return __spirv_BuiltInWorkgroupId (dim ) * __spirv_BuiltInWorkgroupSize (dim ) +
21+ __spirv_BuiltInLocalInvocationId (dim ) +
22+ __spirv_BuiltInGlobalOffset (dim );
1923}
You can’t perform that action at this time.
0 commit comments