File tree 4 files changed +11
-5
lines changed
4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 80
80
#define __opencl_c_named_address_space_builtins 1
81
81
#endif // !defined(__opencl_c_generic_address_space)
82
82
83
+ #if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups)
84
+ // Internal feature macro to provide subgroup builtins.
85
+ #define __opencl_subgroup_builtins 1
86
+ #endif
87
+
83
88
// built-in scalar data types:
84
89
85
90
/* *
Original file line number Diff line number Diff line change @@ -16282,7 +16282,7 @@ queue_t __ovld get_default_queue(void);
16282
16282
16283
16283
// OpenCL Extension v2.0 s9.17 - Sub-groups
16284
16284
16285
- #if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups )
16285
+ #if defined(__opencl_subgroup_builtins )
16286
16286
// Shared Sub Group Functions
16287
16287
uint __ovld get_sub_group_size(void);
16288
16288
uint __ovld get_max_sub_group_size(void);
@@ -16381,7 +16381,7 @@ double __ovld __conv sub_group_scan_inclusive_min(double x);
16381
16381
double __ovld __conv sub_group_scan_inclusive_max(double x);
16382
16382
#endif //cl_khr_fp64
16383
16383
16384
- #endif //cl_khr_subgroups cl_intel_subgroups __opencl_c_subgroups
16384
+ #endif // __opencl_subgroup_builtins
16385
16385
16386
16386
#if defined(cl_khr_subgroup_extended_types)
16387
16387
char __ovld __conv sub_group_broadcast( char value, uint index );
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def AtomicFp64TypeExt : TypeExtension<"cl_khr_int64_base_atomics cl_khr_int64_ex
83
83
84
84
// FunctionExtension definitions.
85
85
def FuncExtNone : FunctionExtension<"">;
86
- def FuncExtKhrSubgroups : FunctionExtension<"cl_khr_subgroups ">;
86
+ def FuncExtKhrSubgroups : FunctionExtension<"__opencl_subgroup_builtins ">;
87
87
def FuncExtKhrSubgroupExtendedTypes : FunctionExtension<"cl_khr_subgroup_extended_types">;
88
88
def FuncExtKhrSubgroupNonUniformVote : FunctionExtension<"cl_khr_subgroup_non_uniform_vote">;
89
89
def FuncExtKhrSubgroupBallot : FunctionExtension<"cl_khr_subgroup_ballot">;
Original file line number Diff line number Diff line change 1
1
// RUN: %clang_cc1 %s -triple spir -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=CL -fdeclare-opencl-builtins -DNO_HEADER
2
2
// RUN: %clang_cc1 %s -triple spir -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=CL -fdeclare-opencl-builtins -finclude-default-header
3
- // RUN: %clang_cc1 %s -triple spir -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=CL1.2 -fdeclare-opencl-builtins -DNO_HEADER
4
- // RUN: %clang_cc1 %s -triple spir -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=CL1.2 -fdeclare-opencl-builtins -finclude-default-header
3
+ // RUN: %clang_cc1 %s -triple spir -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=CL1.2 -fdeclare-opencl-builtins -DNO_HEADER -cl-ext=-cl_intel_subgroups
4
+ // RUN: %clang_cc1 %s -triple spir -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=CL1.2 -fdeclare-opencl-builtins -finclude-default-header -cl-ext=-cl_intel_subgroups
5
5
// RUN: %clang_cc1 %s -triple spir -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=CL2.0 -fdeclare-opencl-builtins -DNO_HEADER
6
6
// RUN: %clang_cc1 %s -triple spir -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=CL2.0 -fdeclare-opencl-builtins -finclude-default-header
7
7
// RUN: %clang_cc1 %s -triple spir -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=CL3.0 -fdeclare-opencl-builtins -finclude-default-header
@@ -79,6 +79,7 @@ typedef struct {int a;} ndrange_t;
79
79
#define cl_khr_subgroup_non_uniform_arithmetic 1
80
80
#define cl_khr_subgroup_clustered_reduce 1
81
81
#define __opencl_c_read_write_images 1
82
+ #define __opencl_subgroup_builtins 1
82
83
#endif
83
84
84
85
#if (__OPENCL_CPP_VERSION__ == 100 || __OPENCL_C_VERSION__ == 200 )
You can’t perform that action at this time.
0 commit comments