diff options
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-devtools/clang/files/0002-Add-cl_khr_extended_subgroup-extensions.patch')
-rw-r--r-- | dynamic-layers/clang-layer/recipes-devtools/clang/files/0002-Add-cl_khr_extended_subgroup-extensions.patch | 812 |
1 files changed, 812 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/0002-Add-cl_khr_extended_subgroup-extensions.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/0002-Add-cl_khr_extended_subgroup-extensions.patch new file mode 100644 index 00000000..cbe492c4 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-devtools/clang/files/0002-Add-cl_khr_extended_subgroup-extensions.patch | |||
@@ -0,0 +1,812 @@ | |||
1 | From 27d47f1a17c8921b07acc8cdc26e38cc609de4a9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 7 Apr 2021 16:38:38 +0800 | ||
4 | Subject: [PATCH 2/2] Add cl_khr_extended_subgroup extensions. | ||
5 | |||
6 | Added extensions and their function declarations into | ||
7 | the standard header. | ||
8 | |||
9 | Patch by Piotr Fusik! | ||
10 | |||
11 | Tags: #clang | ||
12 | |||
13 | Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/4a4402f0d72167477a6252e4c3daf5089ebc8f9a] | ||
14 | Signed-off-by: Anastasia Stulova <anastasia.stulova@arm.com> | ||
15 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
16 | --- | ||
17 | .../include/clang/Basic/OpenCLExtensions.def | 7 + | ||
18 | clang/lib/Headers/opencl-c.h | 668 ++++++++++++++++++ | ||
19 | clang/test/SemaOpenCL/extension-version.cl | 83 +++ | ||
20 | 3 files changed, 758 insertions(+) | ||
21 | |||
22 | diff --git a/clang/include/clang/Basic/OpenCLExtensions.def b/clang/include/clang/Basic/OpenCLExtensions.def | ||
23 | index 608f78a13eef..d1574164f9b2 100644 | ||
24 | --- a/clang/include/clang/Basic/OpenCLExtensions.def | ||
25 | +++ b/clang/include/clang/Basic/OpenCLExtensions.def | ||
26 | @@ -74,6 +74,13 @@ OPENCLEXT_INTERNAL(cl_khr_mipmap_image_writes, 200, ~0U) | ||
27 | OPENCLEXT_INTERNAL(cl_khr_srgb_image_writes, 200, ~0U) | ||
28 | OPENCLEXT_INTERNAL(cl_khr_subgroups, 200, ~0U) | ||
29 | OPENCLEXT_INTERNAL(cl_khr_terminate_context, 200, ~0U) | ||
30 | +OPENCLEXT_INTERNAL(cl_khr_subgroup_extended_types, 200, ~0U) | ||
31 | +OPENCLEXT_INTERNAL(cl_khr_subgroup_non_uniform_vote, 200, ~0U) | ||
32 | +OPENCLEXT_INTERNAL(cl_khr_subgroup_ballot, 200, ~0U) | ||
33 | +OPENCLEXT_INTERNAL(cl_khr_subgroup_non_uniform_arithmetic, 200, ~0U) | ||
34 | +OPENCLEXT_INTERNAL(cl_khr_subgroup_shuffle, 200, ~0U) | ||
35 | +OPENCLEXT_INTERNAL(cl_khr_subgroup_shuffle_relative, 200, ~0U) | ||
36 | +OPENCLEXT_INTERNAL(cl_khr_subgroup_clustered_reduce, 200, ~0U) | ||
37 | |||
38 | // Clang Extensions. | ||
39 | OPENCLEXT_INTERNAL(cl_clang_storage_class_specifiers, 100, ~0U) | ||
40 | diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h | ||
41 | index 93a946cec5b1..67d900eb1c3d 100644 | ||
42 | --- a/clang/lib/Headers/opencl-c.h | ||
43 | +++ b/clang/lib/Headers/opencl-c.h | ||
44 | @@ -17530,6 +17530,674 @@ double __ovld __conv sub_group_scan_inclusive_max(double x); | ||
45 | |||
46 | #endif //cl_khr_subgroups cl_intel_subgroups | ||
47 | |||
48 | +#if defined(cl_khr_subgroup_extended_types) | ||
49 | +char __ovld __conv sub_group_broadcast( char value, uint index ); | ||
50 | +char2 __ovld __conv sub_group_broadcast( char2 value, uint index ); | ||
51 | +char3 __ovld __conv sub_group_broadcast( char3 value, uint index ); | ||
52 | +char4 __ovld __conv sub_group_broadcast( char4 value, uint index ); | ||
53 | +char8 __ovld __conv sub_group_broadcast( char8 value, uint index ); | ||
54 | +char16 __ovld __conv sub_group_broadcast( char16 value, uint index ); | ||
55 | + | ||
56 | +uchar __ovld __conv sub_group_broadcast( uchar value, uint index ); | ||
57 | +uchar2 __ovld __conv sub_group_broadcast( uchar2 value, uint index ); | ||
58 | +uchar3 __ovld __conv sub_group_broadcast( uchar3 value, uint index ); | ||
59 | +uchar4 __ovld __conv sub_group_broadcast( uchar4 value, uint index ); | ||
60 | +uchar8 __ovld __conv sub_group_broadcast( uchar8 value, uint index ); | ||
61 | +uchar16 __ovld __conv sub_group_broadcast( uchar16 value, uint index ); | ||
62 | + | ||
63 | +short __ovld __conv sub_group_broadcast( short value, uint index ); | ||
64 | +short2 __ovld __conv sub_group_broadcast( short2 value, uint index ); | ||
65 | +short3 __ovld __conv sub_group_broadcast( short3 value, uint index ); | ||
66 | +short4 __ovld __conv sub_group_broadcast( short4 value, uint index ); | ||
67 | +short8 __ovld __conv sub_group_broadcast( short8 value, uint index ); | ||
68 | +short16 __ovld __conv sub_group_broadcast( short16 value, uint index ); | ||
69 | + | ||
70 | +ushort __ovld __conv sub_group_broadcast( ushort value, uint index ); | ||
71 | +ushort2 __ovld __conv sub_group_broadcast( ushort2 value, uint index ); | ||
72 | +ushort3 __ovld __conv sub_group_broadcast( ushort3 value, uint index ); | ||
73 | +ushort4 __ovld __conv sub_group_broadcast( ushort4 value, uint index ); | ||
74 | +ushort8 __ovld __conv sub_group_broadcast( ushort8 value, uint index ); | ||
75 | +ushort16 __ovld __conv sub_group_broadcast( ushort16 value, uint index ); | ||
76 | + | ||
77 | +// scalar int broadcast is part of cl_khr_subgroups | ||
78 | +int2 __ovld __conv sub_group_broadcast( int2 value, uint index ); | ||
79 | +int3 __ovld __conv sub_group_broadcast( int3 value, uint index ); | ||
80 | +int4 __ovld __conv sub_group_broadcast( int4 value, uint index ); | ||
81 | +int8 __ovld __conv sub_group_broadcast( int8 value, uint index ); | ||
82 | +int16 __ovld __conv sub_group_broadcast( int16 value, uint index ); | ||
83 | + | ||
84 | +// scalar uint broadcast is part of cl_khr_subgroups | ||
85 | +uint2 __ovld __conv sub_group_broadcast( uint2 value, uint index ); | ||
86 | +uint3 __ovld __conv sub_group_broadcast( uint3 value, uint index ); | ||
87 | +uint4 __ovld __conv sub_group_broadcast( uint4 value, uint index ); | ||
88 | +uint8 __ovld __conv sub_group_broadcast( uint8 value, uint index ); | ||
89 | +uint16 __ovld __conv sub_group_broadcast( uint16 value, uint index ); | ||
90 | + | ||
91 | +// scalar long broadcast is part of cl_khr_subgroups | ||
92 | +long2 __ovld __conv sub_group_broadcast( long2 value, uint index ); | ||
93 | +long3 __ovld __conv sub_group_broadcast( long3 value, uint index ); | ||
94 | +long4 __ovld __conv sub_group_broadcast( long4 value, uint index ); | ||
95 | +long8 __ovld __conv sub_group_broadcast( long8 value, uint index ); | ||
96 | +long16 __ovld __conv sub_group_broadcast( long16 value, uint index ); | ||
97 | + | ||
98 | +// scalar ulong broadcast is part of cl_khr_subgroups | ||
99 | +ulong2 __ovld __conv sub_group_broadcast( ulong2 value, uint index ); | ||
100 | +ulong3 __ovld __conv sub_group_broadcast( ulong3 value, uint index ); | ||
101 | +ulong4 __ovld __conv sub_group_broadcast( ulong4 value, uint index ); | ||
102 | +ulong8 __ovld __conv sub_group_broadcast( ulong8 value, uint index ); | ||
103 | +ulong16 __ovld __conv sub_group_broadcast( ulong16 value, uint index ); | ||
104 | + | ||
105 | +// scalar float broadcast is part of cl_khr_subgroups | ||
106 | +float2 __ovld __conv sub_group_broadcast( float2 value, uint index ); | ||
107 | +float3 __ovld __conv sub_group_broadcast( float3 value, uint index ); | ||
108 | +float4 __ovld __conv sub_group_broadcast( float4 value, uint index ); | ||
109 | +float8 __ovld __conv sub_group_broadcast( float8 value, uint index ); | ||
110 | +float16 __ovld __conv sub_group_broadcast( float16 value, uint index ); | ||
111 | + | ||
112 | +char __ovld __conv sub_group_reduce_add( char value ); | ||
113 | +uchar __ovld __conv sub_group_reduce_add( uchar value ); | ||
114 | +short __ovld __conv sub_group_reduce_add( short value ); | ||
115 | +ushort __ovld __conv sub_group_reduce_add( ushort value ); | ||
116 | + | ||
117 | +char __ovld __conv sub_group_reduce_min( char value ); | ||
118 | +uchar __ovld __conv sub_group_reduce_min( uchar value ); | ||
119 | +short __ovld __conv sub_group_reduce_min( short value ); | ||
120 | +ushort __ovld __conv sub_group_reduce_min( ushort value ); | ||
121 | + | ||
122 | +char __ovld __conv sub_group_reduce_max( char value ); | ||
123 | +uchar __ovld __conv sub_group_reduce_max( uchar value ); | ||
124 | +short __ovld __conv sub_group_reduce_max( short value ); | ||
125 | +ushort __ovld __conv sub_group_reduce_max( ushort value ); | ||
126 | + | ||
127 | +char __ovld __conv sub_group_scan_inclusive_add( char value ); | ||
128 | +uchar __ovld __conv sub_group_scan_inclusive_add( uchar value ); | ||
129 | +short __ovld __conv sub_group_scan_inclusive_add( short value ); | ||
130 | +ushort __ovld __conv sub_group_scan_inclusive_add( ushort value ); | ||
131 | + | ||
132 | +char __ovld __conv sub_group_scan_inclusive_min( char value ); | ||
133 | +uchar __ovld __conv sub_group_scan_inclusive_min( uchar value ); | ||
134 | +short __ovld __conv sub_group_scan_inclusive_min( short value ); | ||
135 | +ushort __ovld __conv sub_group_scan_inclusive_min( ushort value ); | ||
136 | + | ||
137 | +char __ovld __conv sub_group_scan_inclusive_max( char value ); | ||
138 | +uchar __ovld __conv sub_group_scan_inclusive_max( uchar value ); | ||
139 | +short __ovld __conv sub_group_scan_inclusive_max( short value ); | ||
140 | +ushort __ovld __conv sub_group_scan_inclusive_max( ushort value ); | ||
141 | + | ||
142 | +char __ovld __conv sub_group_scan_exclusive_add( char value ); | ||
143 | +uchar __ovld __conv sub_group_scan_exclusive_add( uchar value ); | ||
144 | +short __ovld __conv sub_group_scan_exclusive_add( short value ); | ||
145 | +ushort __ovld __conv sub_group_scan_exclusive_add( ushort value ); | ||
146 | + | ||
147 | +char __ovld __conv sub_group_scan_exclusive_min( char value ); | ||
148 | +uchar __ovld __conv sub_group_scan_exclusive_min( uchar value ); | ||
149 | +short __ovld __conv sub_group_scan_exclusive_min( short value ); | ||
150 | +ushort __ovld __conv sub_group_scan_exclusive_min( ushort value ); | ||
151 | + | ||
152 | +char __ovld __conv sub_group_scan_exclusive_max( char value ); | ||
153 | +uchar __ovld __conv sub_group_scan_exclusive_max( uchar value ); | ||
154 | +short __ovld __conv sub_group_scan_exclusive_max( short value ); | ||
155 | +ushort __ovld __conv sub_group_scan_exclusive_max( ushort value ); | ||
156 | + | ||
157 | +#if defined(cl_khr_fp16) | ||
158 | +// scalar half broadcast is part of cl_khr_subgroups | ||
159 | +half2 __ovld __conv sub_group_broadcast( half2 value, uint index ); | ||
160 | +half3 __ovld __conv sub_group_broadcast( half3 value, uint index ); | ||
161 | +half4 __ovld __conv sub_group_broadcast( half4 value, uint index ); | ||
162 | +half8 __ovld __conv sub_group_broadcast( half8 value, uint index ); | ||
163 | +half16 __ovld __conv sub_group_broadcast( half16 value, uint index ); | ||
164 | +#endif // cl_khr_fp16 | ||
165 | + | ||
166 | +#if defined(cl_khr_fp64) | ||
167 | +// scalar double broadcast is part of cl_khr_subgroups | ||
168 | +double2 __ovld __conv sub_group_broadcast( double2 value, uint index ); | ||
169 | +double3 __ovld __conv sub_group_broadcast( double3 value, uint index ); | ||
170 | +double4 __ovld __conv sub_group_broadcast( double4 value, uint index ); | ||
171 | +double8 __ovld __conv sub_group_broadcast( double8 value, uint index ); | ||
172 | +double16 __ovld __conv sub_group_broadcast( double16 value, uint index ); | ||
173 | +#endif // cl_khr_fp64 | ||
174 | + | ||
175 | +#endif // cl_khr_subgroup_extended_types | ||
176 | + | ||
177 | +#if defined(cl_khr_subgroup_non_uniform_vote) | ||
178 | +int __ovld sub_group_elect(void); | ||
179 | +int __ovld sub_group_non_uniform_all( int predicate ); | ||
180 | +int __ovld sub_group_non_uniform_any( int predicate ); | ||
181 | + | ||
182 | +int __ovld sub_group_non_uniform_all_equal( char value ); | ||
183 | +int __ovld sub_group_non_uniform_all_equal( uchar value ); | ||
184 | +int __ovld sub_group_non_uniform_all_equal( short value ); | ||
185 | +int __ovld sub_group_non_uniform_all_equal( ushort value ); | ||
186 | +int __ovld sub_group_non_uniform_all_equal( int value ); | ||
187 | +int __ovld sub_group_non_uniform_all_equal( uint value ); | ||
188 | +int __ovld sub_group_non_uniform_all_equal( long value ); | ||
189 | +int __ovld sub_group_non_uniform_all_equal( ulong value ); | ||
190 | +int __ovld sub_group_non_uniform_all_equal( float value ); | ||
191 | + | ||
192 | +#if defined(cl_khr_fp16) | ||
193 | +int __ovld sub_group_non_uniform_all_equal( half value ); | ||
194 | +#endif // cl_khr_fp16 | ||
195 | + | ||
196 | +#if defined(cl_khr_fp64) | ||
197 | +int __ovld sub_group_non_uniform_all_equal( double value ); | ||
198 | +#endif // cl_khr_fp64 | ||
199 | + | ||
200 | +#endif // cl_khr_subgroup_non_uniform_vote | ||
201 | + | ||
202 | +#if defined(cl_khr_subgroup_ballot) | ||
203 | +char __ovld sub_group_non_uniform_broadcast( char value, uint index ); | ||
204 | +char2 __ovld sub_group_non_uniform_broadcast( char2 value, uint index ); | ||
205 | +char3 __ovld sub_group_non_uniform_broadcast( char3 value, uint index ); | ||
206 | +char4 __ovld sub_group_non_uniform_broadcast( char4 value, uint index ); | ||
207 | +char8 __ovld sub_group_non_uniform_broadcast( char8 value, uint index ); | ||
208 | +char16 __ovld sub_group_non_uniform_broadcast( char16 value, uint index ); | ||
209 | + | ||
210 | +uchar __ovld sub_group_non_uniform_broadcast( uchar value, uint index ); | ||
211 | +uchar2 __ovld sub_group_non_uniform_broadcast( uchar2 value, uint index ); | ||
212 | +uchar3 __ovld sub_group_non_uniform_broadcast( uchar3 value, uint index ); | ||
213 | +uchar4 __ovld sub_group_non_uniform_broadcast( uchar4 value, uint index ); | ||
214 | +uchar8 __ovld sub_group_non_uniform_broadcast( uchar8 value, uint index ); | ||
215 | +uchar16 __ovld sub_group_non_uniform_broadcast( uchar16 value, uint index ); | ||
216 | + | ||
217 | +short __ovld sub_group_non_uniform_broadcast( short value, uint index ); | ||
218 | +short2 __ovld sub_group_non_uniform_broadcast( short2 value, uint index ); | ||
219 | +short3 __ovld sub_group_non_uniform_broadcast( short3 value, uint index ); | ||
220 | +short4 __ovld sub_group_non_uniform_broadcast( short4 value, uint index ); | ||
221 | +short8 __ovld sub_group_non_uniform_broadcast( short8 value, uint index ); | ||
222 | +short16 __ovld sub_group_non_uniform_broadcast( short16 value, uint index ); | ||
223 | + | ||
224 | +ushort __ovld sub_group_non_uniform_broadcast( ushort value, uint index ); | ||
225 | +ushort2 __ovld sub_group_non_uniform_broadcast( ushort2 value, uint index ); | ||
226 | +ushort3 __ovld sub_group_non_uniform_broadcast( ushort3 value, uint index ); | ||
227 | +ushort4 __ovld sub_group_non_uniform_broadcast( ushort4 value, uint index ); | ||
228 | +ushort8 __ovld sub_group_non_uniform_broadcast( ushort8 value, uint index ); | ||
229 | +ushort16 __ovld sub_group_non_uniform_broadcast( ushort16 value, uint index ); | ||
230 | + | ||
231 | +int __ovld sub_group_non_uniform_broadcast( int value, uint index ); | ||
232 | +int2 __ovld sub_group_non_uniform_broadcast( int2 value, uint index ); | ||
233 | +int3 __ovld sub_group_non_uniform_broadcast( int3 value, uint index ); | ||
234 | +int4 __ovld sub_group_non_uniform_broadcast( int4 value, uint index ); | ||
235 | +int8 __ovld sub_group_non_uniform_broadcast( int8 value, uint index ); | ||
236 | +int16 __ovld sub_group_non_uniform_broadcast( int16 value, uint index ); | ||
237 | + | ||
238 | +uint __ovld sub_group_non_uniform_broadcast( uint value, uint index ); | ||
239 | +uint2 __ovld sub_group_non_uniform_broadcast( uint2 value, uint index ); | ||
240 | +uint3 __ovld sub_group_non_uniform_broadcast( uint3 value, uint index ); | ||
241 | +uint4 __ovld sub_group_non_uniform_broadcast( uint4 value, uint index ); | ||
242 | +uint8 __ovld sub_group_non_uniform_broadcast( uint8 value, uint index ); | ||
243 | +uint16 __ovld sub_group_non_uniform_broadcast( uint16 value, uint index ); | ||
244 | + | ||
245 | +long __ovld sub_group_non_uniform_broadcast( long value, uint index ); | ||
246 | +long2 __ovld sub_group_non_uniform_broadcast( long2 value, uint index ); | ||
247 | +long3 __ovld sub_group_non_uniform_broadcast( long3 value, uint index ); | ||
248 | +long4 __ovld sub_group_non_uniform_broadcast( long4 value, uint index ); | ||
249 | +long8 __ovld sub_group_non_uniform_broadcast( long8 value, uint index ); | ||
250 | +long16 __ovld sub_group_non_uniform_broadcast( long16 value, uint index ); | ||
251 | + | ||
252 | +ulong __ovld sub_group_non_uniform_broadcast( ulong value, uint index ); | ||
253 | +ulong2 __ovld sub_group_non_uniform_broadcast( ulong2 value, uint index ); | ||
254 | +ulong3 __ovld sub_group_non_uniform_broadcast( ulong3 value, uint index ); | ||
255 | +ulong4 __ovld sub_group_non_uniform_broadcast( ulong4 value, uint index ); | ||
256 | +ulong8 __ovld sub_group_non_uniform_broadcast( ulong8 value, uint index ); | ||
257 | +ulong16 __ovld sub_group_non_uniform_broadcast( ulong16 value, uint index ); | ||
258 | + | ||
259 | +float __ovld sub_group_non_uniform_broadcast( float value, uint index ); | ||
260 | +float2 __ovld sub_group_non_uniform_broadcast( float2 value, uint index ); | ||
261 | +float3 __ovld sub_group_non_uniform_broadcast( float3 value, uint index ); | ||
262 | +float4 __ovld sub_group_non_uniform_broadcast( float4 value, uint index ); | ||
263 | +float8 __ovld sub_group_non_uniform_broadcast( float8 value, uint index ); | ||
264 | +float16 __ovld sub_group_non_uniform_broadcast( float16 value, uint index ); | ||
265 | + | ||
266 | +char __ovld sub_group_broadcast_first( char value ); | ||
267 | +uchar __ovld sub_group_broadcast_first( uchar value ); | ||
268 | +short __ovld sub_group_broadcast_first( short value ); | ||
269 | +ushort __ovld sub_group_broadcast_first( ushort value ); | ||
270 | +int __ovld sub_group_broadcast_first( int value ); | ||
271 | +uint __ovld sub_group_broadcast_first( uint value ); | ||
272 | +long __ovld sub_group_broadcast_first( long value ); | ||
273 | +ulong __ovld sub_group_broadcast_first( ulong value ); | ||
274 | +float __ovld sub_group_broadcast_first( float value ); | ||
275 | + | ||
276 | +uint4 __ovld sub_group_ballot( int predicate ); | ||
277 | +int __ovld __cnfn sub_group_inverse_ballot( uint4 value ); | ||
278 | +int __ovld __cnfn sub_group_ballot_bit_extract( uint4 value, uint index ); | ||
279 | +uint __ovld __cnfn sub_group_ballot_bit_count( uint4 value ); | ||
280 | + | ||
281 | +uint __ovld sub_group_ballot_inclusive_scan( uint4 value ); | ||
282 | +uint __ovld sub_group_ballot_exclusive_scan( uint4 value ); | ||
283 | +uint __ovld sub_group_ballot_find_lsb( uint4 value ); | ||
284 | +uint __ovld sub_group_ballot_find_msb( uint4 value ); | ||
285 | + | ||
286 | +uint4 __ovld __cnfn get_sub_group_eq_mask(void); | ||
287 | +uint4 __ovld __cnfn get_sub_group_ge_mask(void); | ||
288 | +uint4 __ovld __cnfn get_sub_group_gt_mask(void); | ||
289 | +uint4 __ovld __cnfn get_sub_group_le_mask(void); | ||
290 | +uint4 __ovld __cnfn get_sub_group_lt_mask(void); | ||
291 | + | ||
292 | +#if defined(cl_khr_fp16) | ||
293 | +half __ovld sub_group_non_uniform_broadcast( half value, uint index ); | ||
294 | +half2 __ovld sub_group_non_uniform_broadcast( half2 value, uint index ); | ||
295 | +half3 __ovld sub_group_non_uniform_broadcast( half3 value, uint index ); | ||
296 | +half4 __ovld sub_group_non_uniform_broadcast( half4 value, uint index ); | ||
297 | +half8 __ovld sub_group_non_uniform_broadcast( half8 value, uint index ); | ||
298 | +half16 __ovld sub_group_non_uniform_broadcast( half16 value, uint index ); | ||
299 | + | ||
300 | +half __ovld sub_group_broadcast_first( half value ); | ||
301 | +#endif // cl_khr_fp16 | ||
302 | + | ||
303 | +#if defined(cl_khr_fp64) | ||
304 | +double __ovld sub_group_non_uniform_broadcast( double value, uint index ); | ||
305 | +double2 __ovld sub_group_non_uniform_broadcast( double2 value, uint index ); | ||
306 | +double3 __ovld sub_group_non_uniform_broadcast( double3 value, uint index ); | ||
307 | +double4 __ovld sub_group_non_uniform_broadcast( double4 value, uint index ); | ||
308 | +double8 __ovld sub_group_non_uniform_broadcast( double8 value, uint index ); | ||
309 | +double16 __ovld sub_group_non_uniform_broadcast( double16 value, uint index ); | ||
310 | + | ||
311 | +double __ovld sub_group_broadcast_first( double value ); | ||
312 | +#endif // cl_khr_fp64 | ||
313 | + | ||
314 | +#endif // cl_khr_subgroup_ballot | ||
315 | + | ||
316 | +#if defined(cl_khr_subgroup_non_uniform_arithmetic) | ||
317 | +char __ovld sub_group_non_uniform_reduce_add( char value ); | ||
318 | +uchar __ovld sub_group_non_uniform_reduce_add( uchar value ); | ||
319 | +short __ovld sub_group_non_uniform_reduce_add( short value ); | ||
320 | +ushort __ovld sub_group_non_uniform_reduce_add( ushort value ); | ||
321 | +int __ovld sub_group_non_uniform_reduce_add( int value ); | ||
322 | +uint __ovld sub_group_non_uniform_reduce_add( uint value ); | ||
323 | +long __ovld sub_group_non_uniform_reduce_add( long value ); | ||
324 | +ulong __ovld sub_group_non_uniform_reduce_add( ulong value ); | ||
325 | +float __ovld sub_group_non_uniform_reduce_add( float value ); | ||
326 | + | ||
327 | +char __ovld sub_group_non_uniform_reduce_mul( char value ); | ||
328 | +uchar __ovld sub_group_non_uniform_reduce_mul( uchar value ); | ||
329 | +short __ovld sub_group_non_uniform_reduce_mul( short value ); | ||
330 | +ushort __ovld sub_group_non_uniform_reduce_mul( ushort value ); | ||
331 | +int __ovld sub_group_non_uniform_reduce_mul( int value ); | ||
332 | +uint __ovld sub_group_non_uniform_reduce_mul( uint value ); | ||
333 | +long __ovld sub_group_non_uniform_reduce_mul( long value ); | ||
334 | +ulong __ovld sub_group_non_uniform_reduce_mul( ulong value ); | ||
335 | +float __ovld sub_group_non_uniform_reduce_mul( float value ); | ||
336 | + | ||
337 | +char __ovld sub_group_non_uniform_reduce_min( char value ); | ||
338 | +uchar __ovld sub_group_non_uniform_reduce_min( uchar value ); | ||
339 | +short __ovld sub_group_non_uniform_reduce_min( short value ); | ||
340 | +ushort __ovld sub_group_non_uniform_reduce_min( ushort value ); | ||
341 | +int __ovld sub_group_non_uniform_reduce_min( int value ); | ||
342 | +uint __ovld sub_group_non_uniform_reduce_min( uint value ); | ||
343 | +long __ovld sub_group_non_uniform_reduce_min( long value ); | ||
344 | +ulong __ovld sub_group_non_uniform_reduce_min( ulong value ); | ||
345 | +float __ovld sub_group_non_uniform_reduce_min( float value ); | ||
346 | + | ||
347 | +char __ovld sub_group_non_uniform_reduce_max( char value ); | ||
348 | +uchar __ovld sub_group_non_uniform_reduce_max( uchar value ); | ||
349 | +short __ovld sub_group_non_uniform_reduce_max( short value ); | ||
350 | +ushort __ovld sub_group_non_uniform_reduce_max( ushort value ); | ||
351 | +int __ovld sub_group_non_uniform_reduce_max( int value ); | ||
352 | +uint __ovld sub_group_non_uniform_reduce_max( uint value ); | ||
353 | +long __ovld sub_group_non_uniform_reduce_max( long value ); | ||
354 | +ulong __ovld sub_group_non_uniform_reduce_max( ulong value ); | ||
355 | +float __ovld sub_group_non_uniform_reduce_max( float value ); | ||
356 | + | ||
357 | +char __ovld sub_group_non_uniform_scan_inclusive_add( char value ); | ||
358 | +uchar __ovld sub_group_non_uniform_scan_inclusive_add( uchar value ); | ||
359 | +short __ovld sub_group_non_uniform_scan_inclusive_add( short value ); | ||
360 | +ushort __ovld sub_group_non_uniform_scan_inclusive_add( ushort value ); | ||
361 | +int __ovld sub_group_non_uniform_scan_inclusive_add( int value ); | ||
362 | +uint __ovld sub_group_non_uniform_scan_inclusive_add( uint value ); | ||
363 | +long __ovld sub_group_non_uniform_scan_inclusive_add( long value ); | ||
364 | +ulong __ovld sub_group_non_uniform_scan_inclusive_add( ulong value ); | ||
365 | +float __ovld sub_group_non_uniform_scan_inclusive_add( float value ); | ||
366 | + | ||
367 | +char __ovld sub_group_non_uniform_scan_inclusive_mul( char value ); | ||
368 | +uchar __ovld sub_group_non_uniform_scan_inclusive_mul( uchar value ); | ||
369 | +short __ovld sub_group_non_uniform_scan_inclusive_mul( short value ); | ||
370 | +ushort __ovld sub_group_non_uniform_scan_inclusive_mul( ushort value ); | ||
371 | +int __ovld sub_group_non_uniform_scan_inclusive_mul( int value ); | ||
372 | +uint __ovld sub_group_non_uniform_scan_inclusive_mul( uint value ); | ||
373 | +long __ovld sub_group_non_uniform_scan_inclusive_mul( long value ); | ||
374 | +ulong __ovld sub_group_non_uniform_scan_inclusive_mul( ulong value ); | ||
375 | +float __ovld sub_group_non_uniform_scan_inclusive_mul( float value ); | ||
376 | + | ||
377 | +char __ovld sub_group_non_uniform_scan_inclusive_min( char value ); | ||
378 | +uchar __ovld sub_group_non_uniform_scan_inclusive_min( uchar value ); | ||
379 | +short __ovld sub_group_non_uniform_scan_inclusive_min( short value ); | ||
380 | +ushort __ovld sub_group_non_uniform_scan_inclusive_min( ushort value ); | ||
381 | +int __ovld sub_group_non_uniform_scan_inclusive_min( int value ); | ||
382 | +uint __ovld sub_group_non_uniform_scan_inclusive_min( uint value ); | ||
383 | +long __ovld sub_group_non_uniform_scan_inclusive_min( long value ); | ||
384 | +ulong __ovld sub_group_non_uniform_scan_inclusive_min( ulong value ); | ||
385 | +float __ovld sub_group_non_uniform_scan_inclusive_min( float value ); | ||
386 | + | ||
387 | +char __ovld sub_group_non_uniform_scan_inclusive_max( char value ); | ||
388 | +uchar __ovld sub_group_non_uniform_scan_inclusive_max( uchar value ); | ||
389 | +short __ovld sub_group_non_uniform_scan_inclusive_max( short value ); | ||
390 | +ushort __ovld sub_group_non_uniform_scan_inclusive_max( ushort value ); | ||
391 | +int __ovld sub_group_non_uniform_scan_inclusive_max( int value ); | ||
392 | +uint __ovld sub_group_non_uniform_scan_inclusive_max( uint value ); | ||
393 | +long __ovld sub_group_non_uniform_scan_inclusive_max( long value ); | ||
394 | +ulong __ovld sub_group_non_uniform_scan_inclusive_max( ulong value ); | ||
395 | +float __ovld sub_group_non_uniform_scan_inclusive_max( float value ); | ||
396 | + | ||
397 | +char __ovld sub_group_non_uniform_scan_exclusive_add( char value ); | ||
398 | +uchar __ovld sub_group_non_uniform_scan_exclusive_add( uchar value ); | ||
399 | +short __ovld sub_group_non_uniform_scan_exclusive_add( short value ); | ||
400 | +ushort __ovld sub_group_non_uniform_scan_exclusive_add( ushort value ); | ||
401 | +int __ovld sub_group_non_uniform_scan_exclusive_add( int value ); | ||
402 | +uint __ovld sub_group_non_uniform_scan_exclusive_add( uint value ); | ||
403 | +long __ovld sub_group_non_uniform_scan_exclusive_add( long value ); | ||
404 | +ulong __ovld sub_group_non_uniform_scan_exclusive_add( ulong value ); | ||
405 | +float __ovld sub_group_non_uniform_scan_exclusive_add( float value ); | ||
406 | + | ||
407 | +char __ovld sub_group_non_uniform_scan_exclusive_mul( char value ); | ||
408 | +uchar __ovld sub_group_non_uniform_scan_exclusive_mul( uchar value ); | ||
409 | +short __ovld sub_group_non_uniform_scan_exclusive_mul( short value ); | ||
410 | +ushort __ovld sub_group_non_uniform_scan_exclusive_mul( ushort value ); | ||
411 | +int __ovld sub_group_non_uniform_scan_exclusive_mul( int value ); | ||
412 | +uint __ovld sub_group_non_uniform_scan_exclusive_mul( uint value ); | ||
413 | +long __ovld sub_group_non_uniform_scan_exclusive_mul( long value ); | ||
414 | +ulong __ovld sub_group_non_uniform_scan_exclusive_mul( ulong value ); | ||
415 | +float __ovld sub_group_non_uniform_scan_exclusive_mul( float value ); | ||
416 | + | ||
417 | +char __ovld sub_group_non_uniform_scan_exclusive_min( char value ); | ||
418 | +uchar __ovld sub_group_non_uniform_scan_exclusive_min( uchar value ); | ||
419 | +short __ovld sub_group_non_uniform_scan_exclusive_min( short value ); | ||
420 | +ushort __ovld sub_group_non_uniform_scan_exclusive_min( ushort value ); | ||
421 | +int __ovld sub_group_non_uniform_scan_exclusive_min( int value ); | ||
422 | +uint __ovld sub_group_non_uniform_scan_exclusive_min( uint value ); | ||
423 | +long __ovld sub_group_non_uniform_scan_exclusive_min( long value ); | ||
424 | +ulong __ovld sub_group_non_uniform_scan_exclusive_min( ulong value ); | ||
425 | +float __ovld sub_group_non_uniform_scan_exclusive_min( float value ); | ||
426 | + | ||
427 | +char __ovld sub_group_non_uniform_scan_exclusive_max( char value ); | ||
428 | +uchar __ovld sub_group_non_uniform_scan_exclusive_max( uchar value ); | ||
429 | +short __ovld sub_group_non_uniform_scan_exclusive_max( short value ); | ||
430 | +ushort __ovld sub_group_non_uniform_scan_exclusive_max( ushort value ); | ||
431 | +int __ovld sub_group_non_uniform_scan_exclusive_max( int value ); | ||
432 | +uint __ovld sub_group_non_uniform_scan_exclusive_max( uint value ); | ||
433 | +long __ovld sub_group_non_uniform_scan_exclusive_max( long value ); | ||
434 | +ulong __ovld sub_group_non_uniform_scan_exclusive_max( ulong value ); | ||
435 | +float __ovld sub_group_non_uniform_scan_exclusive_max( float value ); | ||
436 | + | ||
437 | +char __ovld sub_group_non_uniform_reduce_and( char value ); | ||
438 | +uchar __ovld sub_group_non_uniform_reduce_and( uchar value ); | ||
439 | +short __ovld sub_group_non_uniform_reduce_and( short value ); | ||
440 | +ushort __ovld sub_group_non_uniform_reduce_and( ushort value ); | ||
441 | +int __ovld sub_group_non_uniform_reduce_and( int value ); | ||
442 | +uint __ovld sub_group_non_uniform_reduce_and( uint value ); | ||
443 | +long __ovld sub_group_non_uniform_reduce_and( long value ); | ||
444 | +ulong __ovld sub_group_non_uniform_reduce_and( ulong value ); | ||
445 | + | ||
446 | +char __ovld sub_group_non_uniform_reduce_or( char value ); | ||
447 | +uchar __ovld sub_group_non_uniform_reduce_or( uchar value ); | ||
448 | +short __ovld sub_group_non_uniform_reduce_or( short value ); | ||
449 | +ushort __ovld sub_group_non_uniform_reduce_or( ushort value ); | ||
450 | +int __ovld sub_group_non_uniform_reduce_or( int value ); | ||
451 | +uint __ovld sub_group_non_uniform_reduce_or( uint value ); | ||
452 | +long __ovld sub_group_non_uniform_reduce_or( long value ); | ||
453 | +ulong __ovld sub_group_non_uniform_reduce_or( ulong value ); | ||
454 | + | ||
455 | +char __ovld sub_group_non_uniform_reduce_xor( char value ); | ||
456 | +uchar __ovld sub_group_non_uniform_reduce_xor( uchar value ); | ||
457 | +short __ovld sub_group_non_uniform_reduce_xor( short value ); | ||
458 | +ushort __ovld sub_group_non_uniform_reduce_xor( ushort value ); | ||
459 | +int __ovld sub_group_non_uniform_reduce_xor( int value ); | ||
460 | +uint __ovld sub_group_non_uniform_reduce_xor( uint value ); | ||
461 | +long __ovld sub_group_non_uniform_reduce_xor( long value ); | ||
462 | +ulong __ovld sub_group_non_uniform_reduce_xor( ulong value ); | ||
463 | + | ||
464 | +char __ovld sub_group_non_uniform_scan_inclusive_and( char value ); | ||
465 | +uchar __ovld sub_group_non_uniform_scan_inclusive_and( uchar value ); | ||
466 | +short __ovld sub_group_non_uniform_scan_inclusive_and( short value ); | ||
467 | +ushort __ovld sub_group_non_uniform_scan_inclusive_and( ushort value ); | ||
468 | +int __ovld sub_group_non_uniform_scan_inclusive_and( int value ); | ||
469 | +uint __ovld sub_group_non_uniform_scan_inclusive_and( uint value ); | ||
470 | +long __ovld sub_group_non_uniform_scan_inclusive_and( long value ); | ||
471 | +ulong __ovld sub_group_non_uniform_scan_inclusive_and( ulong value ); | ||
472 | + | ||
473 | +char __ovld sub_group_non_uniform_scan_inclusive_or( char value ); | ||
474 | +uchar __ovld sub_group_non_uniform_scan_inclusive_or( uchar value ); | ||
475 | +short __ovld sub_group_non_uniform_scan_inclusive_or( short value ); | ||
476 | +ushort __ovld sub_group_non_uniform_scan_inclusive_or( ushort value ); | ||
477 | +int __ovld sub_group_non_uniform_scan_inclusive_or( int value ); | ||
478 | +uint __ovld sub_group_non_uniform_scan_inclusive_or( uint value ); | ||
479 | +long __ovld sub_group_non_uniform_scan_inclusive_or( long value ); | ||
480 | +ulong __ovld sub_group_non_uniform_scan_inclusive_or( ulong value ); | ||
481 | + | ||
482 | +char __ovld sub_group_non_uniform_scan_inclusive_xor( char value ); | ||
483 | +uchar __ovld sub_group_non_uniform_scan_inclusive_xor( uchar value ); | ||
484 | +short __ovld sub_group_non_uniform_scan_inclusive_xor( short value ); | ||
485 | +ushort __ovld sub_group_non_uniform_scan_inclusive_xor( ushort value ); | ||
486 | +int __ovld sub_group_non_uniform_scan_inclusive_xor( int value ); | ||
487 | +uint __ovld sub_group_non_uniform_scan_inclusive_xor( uint value ); | ||
488 | +long __ovld sub_group_non_uniform_scan_inclusive_xor( long value ); | ||
489 | +ulong __ovld sub_group_non_uniform_scan_inclusive_xor( ulong value ); | ||
490 | + | ||
491 | +char __ovld sub_group_non_uniform_scan_exclusive_and( char value ); | ||
492 | +uchar __ovld sub_group_non_uniform_scan_exclusive_and( uchar value ); | ||
493 | +short __ovld sub_group_non_uniform_scan_exclusive_and( short value ); | ||
494 | +ushort __ovld sub_group_non_uniform_scan_exclusive_and( ushort value ); | ||
495 | +int __ovld sub_group_non_uniform_scan_exclusive_and( int value ); | ||
496 | +uint __ovld sub_group_non_uniform_scan_exclusive_and( uint value ); | ||
497 | +long __ovld sub_group_non_uniform_scan_exclusive_and( long value ); | ||
498 | +ulong __ovld sub_group_non_uniform_scan_exclusive_and( ulong value ); | ||
499 | + | ||
500 | +char __ovld sub_group_non_uniform_scan_exclusive_or( char value ); | ||
501 | +uchar __ovld sub_group_non_uniform_scan_exclusive_or( uchar value ); | ||
502 | +short __ovld sub_group_non_uniform_scan_exclusive_or( short value ); | ||
503 | +ushort __ovld sub_group_non_uniform_scan_exclusive_or( ushort value ); | ||
504 | +int __ovld sub_group_non_uniform_scan_exclusive_or( int value ); | ||
505 | +uint __ovld sub_group_non_uniform_scan_exclusive_or( uint value ); | ||
506 | +long __ovld sub_group_non_uniform_scan_exclusive_or( long value ); | ||
507 | +ulong __ovld sub_group_non_uniform_scan_exclusive_or( ulong value ); | ||
508 | + | ||
509 | +char __ovld sub_group_non_uniform_scan_exclusive_xor( char value ); | ||
510 | +uchar __ovld sub_group_non_uniform_scan_exclusive_xor( uchar value ); | ||
511 | +short __ovld sub_group_non_uniform_scan_exclusive_xor( short value ); | ||
512 | +ushort __ovld sub_group_non_uniform_scan_exclusive_xor( ushort value ); | ||
513 | +int __ovld sub_group_non_uniform_scan_exclusive_xor( int value ); | ||
514 | +uint __ovld sub_group_non_uniform_scan_exclusive_xor( uint value ); | ||
515 | +long __ovld sub_group_non_uniform_scan_exclusive_xor( long value ); | ||
516 | +ulong __ovld sub_group_non_uniform_scan_exclusive_xor( ulong value ); | ||
517 | + | ||
518 | +int __ovld sub_group_non_uniform_reduce_logical_and( int predicate ); | ||
519 | +int __ovld sub_group_non_uniform_reduce_logical_or( int predicate ); | ||
520 | +int __ovld sub_group_non_uniform_reduce_logical_xor( int predicate ); | ||
521 | + | ||
522 | +int __ovld sub_group_non_uniform_scan_inclusive_logical_and( int predicate ); | ||
523 | +int __ovld sub_group_non_uniform_scan_inclusive_logical_or( int predicate ); | ||
524 | +int __ovld sub_group_non_uniform_scan_inclusive_logical_xor( int predicate ); | ||
525 | + | ||
526 | +int __ovld sub_group_non_uniform_scan_exclusive_logical_and( int predicate ); | ||
527 | +int __ovld sub_group_non_uniform_scan_exclusive_logical_or( int predicate ); | ||
528 | +int __ovld sub_group_non_uniform_scan_exclusive_logical_xor( int predicate ); | ||
529 | + | ||
530 | +#if defined(cl_khr_fp16) | ||
531 | +half __ovld sub_group_non_uniform_reduce_add( half value ); | ||
532 | +half __ovld sub_group_non_uniform_reduce_mul( half value ); | ||
533 | +half __ovld sub_group_non_uniform_reduce_min( half value ); | ||
534 | +half __ovld sub_group_non_uniform_reduce_max( half value ); | ||
535 | +half __ovld sub_group_non_uniform_scan_inclusive_add( half value ); | ||
536 | +half __ovld sub_group_non_uniform_scan_inclusive_mul( half value ); | ||
537 | +half __ovld sub_group_non_uniform_scan_inclusive_min( half value ); | ||
538 | +half __ovld sub_group_non_uniform_scan_inclusive_max( half value ); | ||
539 | +half __ovld sub_group_non_uniform_scan_exclusive_add( half value ); | ||
540 | +half __ovld sub_group_non_uniform_scan_exclusive_mul( half value ); | ||
541 | +half __ovld sub_group_non_uniform_scan_exclusive_min( half value ); | ||
542 | +half __ovld sub_group_non_uniform_scan_exclusive_max( half value ); | ||
543 | +#endif // cl_khr_fp16 | ||
544 | + | ||
545 | +#if defined(cl_khr_fp64) | ||
546 | +double __ovld sub_group_non_uniform_reduce_add( double value ); | ||
547 | +double __ovld sub_group_non_uniform_reduce_mul( double value ); | ||
548 | +double __ovld sub_group_non_uniform_reduce_min( double value ); | ||
549 | +double __ovld sub_group_non_uniform_reduce_max( double value ); | ||
550 | +double __ovld sub_group_non_uniform_scan_inclusive_add( double value ); | ||
551 | +double __ovld sub_group_non_uniform_scan_inclusive_mul( double value ); | ||
552 | +double __ovld sub_group_non_uniform_scan_inclusive_min( double value ); | ||
553 | +double __ovld sub_group_non_uniform_scan_inclusive_max( double value ); | ||
554 | +double __ovld sub_group_non_uniform_scan_exclusive_add( double value ); | ||
555 | +double __ovld sub_group_non_uniform_scan_exclusive_mul( double value ); | ||
556 | +double __ovld sub_group_non_uniform_scan_exclusive_min( double value ); | ||
557 | +double __ovld sub_group_non_uniform_scan_exclusive_max( double value ); | ||
558 | +#endif // cl_khr_fp64 | ||
559 | + | ||
560 | +#endif // cl_khr_subgroup_non_uniform_arithmetic | ||
561 | + | ||
562 | +#if defined(cl_khr_subgroup_shuffle) | ||
563 | +char __ovld sub_group_shuffle( char value, uint index ); | ||
564 | +uchar __ovld sub_group_shuffle( uchar value, uint index ); | ||
565 | +short __ovld sub_group_shuffle( short value, uint index ); | ||
566 | +ushort __ovld sub_group_shuffle( ushort value, uint index ); | ||
567 | +int __ovld sub_group_shuffle( int value, uint index ); | ||
568 | +uint __ovld sub_group_shuffle( uint value, uint index ); | ||
569 | +long __ovld sub_group_shuffle( long value, uint index ); | ||
570 | +ulong __ovld sub_group_shuffle( ulong value, uint index ); | ||
571 | +float __ovld sub_group_shuffle( float value, uint index ); | ||
572 | + | ||
573 | +char __ovld sub_group_shuffle_xor( char value, uint mask ); | ||
574 | +uchar __ovld sub_group_shuffle_xor( uchar value, uint mask ); | ||
575 | +short __ovld sub_group_shuffle_xor( short value, uint mask ); | ||
576 | +ushort __ovld sub_group_shuffle_xor( ushort value, uint mask ); | ||
577 | +int __ovld sub_group_shuffle_xor( int value, uint mask ); | ||
578 | +uint __ovld sub_group_shuffle_xor( uint value, uint mask ); | ||
579 | +long __ovld sub_group_shuffle_xor( long value, uint mask ); | ||
580 | +ulong __ovld sub_group_shuffle_xor( ulong value, uint mask ); | ||
581 | +float __ovld sub_group_shuffle_xor( float value, uint mask ); | ||
582 | + | ||
583 | +#if defined(cl_khr_fp16) | ||
584 | +half __ovld sub_group_shuffle( half value, uint index ); | ||
585 | +half __ovld sub_group_shuffle_xor( half value, uint mask ); | ||
586 | +#endif // cl_khr_fp16 | ||
587 | + | ||
588 | +#if defined(cl_khr_fp64) | ||
589 | +double __ovld sub_group_shuffle( double value, uint index ); | ||
590 | +double __ovld sub_group_shuffle_xor( double value, uint mask ); | ||
591 | +#endif // cl_khr_fp64 | ||
592 | + | ||
593 | +#endif // cl_khr_subgroup_shuffle | ||
594 | + | ||
595 | +#if defined(cl_khr_subgroup_shuffle_relative) | ||
596 | +char __ovld sub_group_shuffle_up( char value, uint delta ); | ||
597 | +uchar __ovld sub_group_shuffle_up( uchar value, uint delta ); | ||
598 | +short __ovld sub_group_shuffle_up( short value, uint delta ); | ||
599 | +ushort __ovld sub_group_shuffle_up( ushort value, uint delta ); | ||
600 | +int __ovld sub_group_shuffle_up( int value, uint delta ); | ||
601 | +uint __ovld sub_group_shuffle_up( uint value, uint delta ); | ||
602 | +long __ovld sub_group_shuffle_up( long value, uint delta ); | ||
603 | +ulong __ovld sub_group_shuffle_up( ulong value, uint delta ); | ||
604 | +float __ovld sub_group_shuffle_up( float value, uint delta ); | ||
605 | + | ||
606 | +char __ovld sub_group_shuffle_down( char value, uint delta ); | ||
607 | +uchar __ovld sub_group_shuffle_down( uchar value, uint delta ); | ||
608 | +short __ovld sub_group_shuffle_down( short value, uint delta ); | ||
609 | +ushort __ovld sub_group_shuffle_down( ushort value, uint delta ); | ||
610 | +int __ovld sub_group_shuffle_down( int value, uint delta ); | ||
611 | +uint __ovld sub_group_shuffle_down( uint value, uint delta ); | ||
612 | +long __ovld sub_group_shuffle_down( long value, uint delta ); | ||
613 | +ulong __ovld sub_group_shuffle_down( ulong value, uint delta ); | ||
614 | +float __ovld sub_group_shuffle_down( float value, uint delta ); | ||
615 | + | ||
616 | +#if defined(cl_khr_fp16) | ||
617 | +half __ovld sub_group_shuffle_up( half value, uint delta ); | ||
618 | +half __ovld sub_group_shuffle_down( half value, uint delta ); | ||
619 | +#endif // cl_khr_fp16 | ||
620 | + | ||
621 | +#if defined(cl_khr_fp64) | ||
622 | +double __ovld sub_group_shuffle_up( double value, uint delta ); | ||
623 | +double __ovld sub_group_shuffle_down( double value, uint delta ); | ||
624 | +#endif // cl_khr_fp64 | ||
625 | + | ||
626 | +#endif // cl_khr_subgroup_shuffle_relative | ||
627 | + | ||
628 | +#if defined(cl_khr_subgroup_clustered_reduce) | ||
629 | +char __ovld sub_group_clustered_reduce_add( char value, uint clustersize ); | ||
630 | +uchar __ovld sub_group_clustered_reduce_add( uchar value, uint clustersize ); | ||
631 | +short __ovld sub_group_clustered_reduce_add( short value, uint clustersize ); | ||
632 | +ushort __ovld sub_group_clustered_reduce_add( ushort value, uint clustersize ); | ||
633 | +int __ovld sub_group_clustered_reduce_add( int value, uint clustersize ); | ||
634 | +uint __ovld sub_group_clustered_reduce_add( uint value, uint clustersize ); | ||
635 | +long __ovld sub_group_clustered_reduce_add( long value, uint clustersize ); | ||
636 | +ulong __ovld sub_group_clustered_reduce_add( ulong value, uint clustersize ); | ||
637 | +float __ovld sub_group_clustered_reduce_add( float value, uint clustersize ); | ||
638 | + | ||
639 | +char __ovld sub_group_clustered_reduce_mul( char value, uint clustersize ); | ||
640 | +uchar __ovld sub_group_clustered_reduce_mul( uchar value, uint clustersize ); | ||
641 | +short __ovld sub_group_clustered_reduce_mul( short value, uint clustersize ); | ||
642 | +ushort __ovld sub_group_clustered_reduce_mul( ushort value, uint clustersize ); | ||
643 | +int __ovld sub_group_clustered_reduce_mul( int value, uint clustersize ); | ||
644 | +uint __ovld sub_group_clustered_reduce_mul( uint value, uint clustersize ); | ||
645 | +long __ovld sub_group_clustered_reduce_mul( long value, uint clustersize ); | ||
646 | +ulong __ovld sub_group_clustered_reduce_mul( ulong value, uint clustersize ); | ||
647 | +float __ovld sub_group_clustered_reduce_mul( float value, uint clustersize ); | ||
648 | + | ||
649 | +char __ovld sub_group_clustered_reduce_min( char value, uint clustersize ); | ||
650 | +uchar __ovld sub_group_clustered_reduce_min( uchar value, uint clustersize ); | ||
651 | +short __ovld sub_group_clustered_reduce_min( short value, uint clustersize ); | ||
652 | +ushort __ovld sub_group_clustered_reduce_min( ushort value, uint clustersize ); | ||
653 | +int __ovld sub_group_clustered_reduce_min( int value, uint clustersize ); | ||
654 | +uint __ovld sub_group_clustered_reduce_min( uint value, uint clustersize ); | ||
655 | +long __ovld sub_group_clustered_reduce_min( long value, uint clustersize ); | ||
656 | +ulong __ovld sub_group_clustered_reduce_min( ulong value, uint clustersize ); | ||
657 | +float __ovld sub_group_clustered_reduce_min( float value, uint clustersize ); | ||
658 | + | ||
659 | +char __ovld sub_group_clustered_reduce_max( char value, uint clustersize ); | ||
660 | +uchar __ovld sub_group_clustered_reduce_max( uchar value, uint clustersize ); | ||
661 | +short __ovld sub_group_clustered_reduce_max( short value, uint clustersize ); | ||
662 | +ushort __ovld sub_group_clustered_reduce_max( ushort value, uint clustersize ); | ||
663 | +int __ovld sub_group_clustered_reduce_max( int value, uint clustersize ); | ||
664 | +uint __ovld sub_group_clustered_reduce_max( uint value, uint clustersize ); | ||
665 | +long __ovld sub_group_clustered_reduce_max( long value, uint clustersize ); | ||
666 | +ulong __ovld sub_group_clustered_reduce_max( ulong value, uint clustersize ); | ||
667 | +float __ovld sub_group_clustered_reduce_max( float value, uint clustersize ); | ||
668 | + | ||
669 | +char __ovld sub_group_clustered_reduce_and( char value, uint clustersize ); | ||
670 | +uchar __ovld sub_group_clustered_reduce_and( uchar value, uint clustersize ); | ||
671 | +short __ovld sub_group_clustered_reduce_and( short value, uint clustersize ); | ||
672 | +ushort __ovld sub_group_clustered_reduce_and( ushort value, uint clustersize ); | ||
673 | +int __ovld sub_group_clustered_reduce_and( int value, uint clustersize ); | ||
674 | +uint __ovld sub_group_clustered_reduce_and( uint value, uint clustersize ); | ||
675 | +long __ovld sub_group_clustered_reduce_and( long value, uint clustersize ); | ||
676 | +ulong __ovld sub_group_clustered_reduce_and( ulong value, uint clustersize ); | ||
677 | + | ||
678 | +char __ovld sub_group_clustered_reduce_or( char value, uint clustersize ); | ||
679 | +uchar __ovld sub_group_clustered_reduce_or( uchar value, uint clustersize ); | ||
680 | +short __ovld sub_group_clustered_reduce_or( short value, uint clustersize ); | ||
681 | +ushort __ovld sub_group_clustered_reduce_or( ushort value, uint clustersize ); | ||
682 | +int __ovld sub_group_clustered_reduce_or( int value, uint clustersize ); | ||
683 | +uint __ovld sub_group_clustered_reduce_or( uint value, uint clustersize ); | ||
684 | +long __ovld sub_group_clustered_reduce_or( long value, uint clustersize ); | ||
685 | +ulong __ovld sub_group_clustered_reduce_or( ulong value, uint clustersize ); | ||
686 | + | ||
687 | +char __ovld sub_group_clustered_reduce_xor( char value, uint clustersize ); | ||
688 | +uchar __ovld sub_group_clustered_reduce_xor( uchar value, uint clustersize ); | ||
689 | +short __ovld sub_group_clustered_reduce_xor( short value, uint clustersize ); | ||
690 | +ushort __ovld sub_group_clustered_reduce_xor( ushort value, uint clustersize ); | ||
691 | +int __ovld sub_group_clustered_reduce_xor( int value, uint clustersize ); | ||
692 | +uint __ovld sub_group_clustered_reduce_xor( uint value, uint clustersize ); | ||
693 | +long __ovld sub_group_clustered_reduce_xor( long value, uint clustersize ); | ||
694 | +ulong __ovld sub_group_clustered_reduce_xor( ulong value, uint clustersize ); | ||
695 | + | ||
696 | +int __ovld sub_group_clustered_reduce_logical_and( int predicate, uint clustersize ); | ||
697 | +int __ovld sub_group_clustered_reduce_logical_or( int predicate, uint clustersize ); | ||
698 | +int __ovld sub_group_clustered_reduce_logical_xor( int predicate, uint clustersize ); | ||
699 | + | ||
700 | +#if defined(cl_khr_fp16) | ||
701 | +half __ovld sub_group_clustered_reduce_add( half value, uint clustersize ); | ||
702 | +half __ovld sub_group_clustered_reduce_mul( half value, uint clustersize ); | ||
703 | +half __ovld sub_group_clustered_reduce_min( half value, uint clustersize ); | ||
704 | +half __ovld sub_group_clustered_reduce_max( half value, uint clustersize ); | ||
705 | +#endif // cl_khr_fp16 | ||
706 | + | ||
707 | +#if defined(cl_khr_fp64) | ||
708 | +double __ovld sub_group_clustered_reduce_add( double value, uint clustersize ); | ||
709 | +double __ovld sub_group_clustered_reduce_mul( double value, uint clustersize ); | ||
710 | +double __ovld sub_group_clustered_reduce_min( double value, uint clustersize ); | ||
711 | +double __ovld sub_group_clustered_reduce_max( double value, uint clustersize ); | ||
712 | +#endif // cl_khr_fp64 | ||
713 | + | ||
714 | +#endif // cl_khr_subgroup_clustered_reduce | ||
715 | + | ||
716 | #if defined(cl_intel_subgroups) | ||
717 | // Intel-Specific Sub Group Functions | ||
718 | float __ovld __conv intel_sub_group_shuffle( float x, uint c ); | ||
719 | diff --git a/clang/test/SemaOpenCL/extension-version.cl b/clang/test/SemaOpenCL/extension-version.cl | ||
720 | index 0e6bbb7d3bcd..86c78143a0eb 100644 | ||
721 | --- a/clang/test/SemaOpenCL/extension-version.cl | ||
722 | +++ b/clang/test/SemaOpenCL/extension-version.cl | ||
723 | @@ -333,3 +333,86 @@ | ||
724 | #endif | ||
725 | #pragma OPENCL EXTENSION cl_intel_device_side_avc_motion_estimation : enable | ||
726 | |||
727 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
728 | +#ifndef cl_khr_subgroup_extended_types | ||
729 | +#error "Missing cl_khr_subgroup_extended_types" | ||
730 | +#endif | ||
731 | +#else | ||
732 | +#ifdef cl_khr_subgroup_extended_types | ||
733 | +#error "Incorrect cl_khr_subgroup_extended_types define" | ||
734 | +#endif | ||
735 | +// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_subgroup_extended_types' - ignoring}} | ||
736 | +#endif | ||
737 | +#pragma OPENCL EXTENSION cl_khr_subgroup_extended_types : enable | ||
738 | + | ||
739 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
740 | +#ifndef cl_khr_subgroup_non_uniform_vote | ||
741 | +#error "Missing cl_khr_subgroup_non_uniform_vote" | ||
742 | +#endif | ||
743 | +#else | ||
744 | +#ifdef cl_khr_subgroup_non_uniform_vote | ||
745 | +#error "Incorrect cl_khr_subgroup_non_uniform_vote define" | ||
746 | +#endif | ||
747 | +// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_subgroup_non_uniform_vote' - ignoring}} | ||
748 | +#endif | ||
749 | +#pragma OPENCL EXTENSION cl_khr_subgroup_non_uniform_vote : enable | ||
750 | + | ||
751 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
752 | +#ifndef cl_khr_subgroup_ballot | ||
753 | +#error "Missing cl_khr_subgroup_ballot" | ||
754 | +#endif | ||
755 | +#else | ||
756 | +#ifdef cl_khr_subgroup_ballot | ||
757 | +#error "Incorrect cl_khr_subgroup_ballot define" | ||
758 | +#endif | ||
759 | +// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_subgroup_ballot' - ignoring}} | ||
760 | +#endif | ||
761 | +#pragma OPENCL EXTENSION cl_khr_subgroup_ballot : enable | ||
762 | + | ||
763 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
764 | +#ifndef cl_khr_subgroup_non_uniform_arithmetic | ||
765 | +#error "Missing cl_khr_subgroup_non_uniform_arithmetic" | ||
766 | +#endif | ||
767 | +#else | ||
768 | +#ifdef cl_khr_subgroup_non_uniform_arithmetic | ||
769 | +#error "Incorrect cl_khr_subgroup_non_uniform_arithmetic define" | ||
770 | +#endif | ||
771 | +// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_subgroup_non_uniform_arithmetic' - ignoring}} | ||
772 | +#endif | ||
773 | +#pragma OPENCL EXTENSION cl_khr_subgroup_non_uniform_arithmetic : enable | ||
774 | + | ||
775 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
776 | +#ifndef cl_khr_subgroup_shuffle | ||
777 | +#error "Missing cl_khr_subgroup_shuffle" | ||
778 | +#endif | ||
779 | +#else | ||
780 | +#ifdef cl_khr_subgroup_shuffle | ||
781 | +#error "Incorrect cl_khr_subgroup_shuffle define" | ||
782 | +#endif | ||
783 | +// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_subgroup_shuffle' - ignoring}} | ||
784 | +#endif | ||
785 | +#pragma OPENCL EXTENSION cl_khr_subgroup_shuffle : enable | ||
786 | + | ||
787 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
788 | +#ifndef cl_khr_subgroup_shuffle_relative | ||
789 | +#error "Missing cl_khr_subgroup_shuffle_relative" | ||
790 | +#endif | ||
791 | +#else | ||
792 | +#ifdef cl_khr_subgroup_shuffle_relative | ||
793 | +#error "Incorrect cl_khr_subgroup_shuffle_relative define" | ||
794 | +#endif | ||
795 | +// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_subgroup_shuffle_relative' - ignoring}} | ||
796 | +#endif | ||
797 | +#pragma OPENCL EXTENSION cl_khr_subgroup_shuffle_relative : enable | ||
798 | + | ||
799 | +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200) | ||
800 | +#ifndef cl_khr_subgroup_clustered_reduce | ||
801 | +#error "Missing cl_khr_subgroup_clustered_reduce" | ||
802 | +#endif | ||
803 | +#else | ||
804 | +#ifdef cl_khr_subgroup_clustered_reduce | ||
805 | +#error "Incorrect cl_khr_subgroup_clustered_reduce define" | ||
806 | +#endif | ||
807 | +// expected-warning@+2{{unsupported OpenCL extension 'cl_khr_subgroup_clustered_reduce' - ignoring}} | ||
808 | +#endif | ||
809 | +#pragma OPENCL EXTENSION cl_khr_subgroup_clustered_reduce : enable | ||
810 | -- | ||
811 | 2.17.1 | ||
812 | |||