1 /**********************************************************************************
2 * Copyright (c) 2008-2018 The Khronos Group Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and/or associated documentation files (the
6 * "Materials"), to deal in the Materials without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Materials, and to
9 * permit persons to whom the Materials are furnished to do so, subject to
10 * the following conditions:
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Materials.
15 * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
16 * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
17 * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
18 * https://www.khronos.org/registry/
20 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
27 **********************************************************************************/
29 #ifndef __CL_PLATFORM_H
30 #define __CL_PLATFORM_H
32 #include <CL/cl_version.h>
40 #define CL_API_CALL __stdcall
41 #define CL_CALLBACK __stdcall
49 * Deprecation flags refer to the last version of the header in which the
50 * feature was not deprecated.
52 * E.g. VERSION_1_1_DEPRECATED means the feature is present in 1.1 without
53 * deprecation but is deprecated in versions later than 1.1.
56 #define CL_EXTENSION_WEAK_LINK
57 #define CL_API_SUFFIX__VERSION_1_0
58 #define CL_EXT_SUFFIX__VERSION_1_0
59 #define CL_API_SUFFIX__VERSION_1_1
60 #define CL_EXT_SUFFIX__VERSION_1_1
61 #define CL_API_SUFFIX__VERSION_1_2
62 #define CL_EXT_SUFFIX__VERSION_1_2
63 #define CL_API_SUFFIX__VERSION_2_0
64 #define CL_EXT_SUFFIX__VERSION_2_0
65 #define CL_API_SUFFIX__VERSION_2_1
66 #define CL_EXT_SUFFIX__VERSION_2_1
67 #define CL_API_SUFFIX__VERSION_2_2
68 #define CL_EXT_SUFFIX__VERSION_2_2
72 #define CL_EXT_SUFFIX_DEPRECATED __attribute__((deprecated))
73 #define CL_EXT_PREFIX_DEPRECATED
75 #define CL_EXT_SUFFIX_DEPRECATED
76 #define CL_EXT_PREFIX_DEPRECATED __declspec(deprecated)
78 #define CL_EXT_SUFFIX_DEPRECATED
79 #define CL_EXT_PREFIX_DEPRECATED
82 #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
83 #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
84 #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
86 #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
87 #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED CL_EXT_PREFIX_DEPRECATED
90 #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
91 #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
92 #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
94 #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
95 #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED CL_EXT_PREFIX_DEPRECATED
98 #ifdef CL_USE_DEPRECATED_OPENCL_1_2_APIS
99 #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
100 #define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
102 #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
103 #define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED CL_EXT_PREFIX_DEPRECATED
106 #ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
107 #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
108 #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
110 #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
111 #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED CL_EXT_PREFIX_DEPRECATED
114 #ifdef CL_USE_DEPRECATED_OPENCL_2_1_APIS
115 #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED
116 #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED
118 #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED CL_EXT_SUFFIX_DEPRECATED
119 #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED CL_EXT_PREFIX_DEPRECATED
122 #if (defined (_WIN32) && defined(_MSC_VER))
125 typedef signed __int8 cl_char
;
126 typedef unsigned __int8 cl_uchar
;
127 typedef signed __int16 cl_short
;
128 typedef unsigned __int16 cl_ushort
;
129 typedef signed __int32 cl_int
;
130 typedef unsigned __int32 cl_uint
;
131 typedef signed __int64 cl_long
;
132 typedef unsigned __int64 cl_ulong
;
134 typedef unsigned __int16 cl_half
;
135 typedef float cl_float
;
136 typedef double cl_double
;
138 /* Macro names and corresponding values defined by OpenCL */
139 #define CL_CHAR_BIT 8
140 #define CL_SCHAR_MAX 127
141 #define CL_SCHAR_MIN (-127-1)
142 #define CL_CHAR_MAX CL_SCHAR_MAX
143 #define CL_CHAR_MIN CL_SCHAR_MIN
144 #define CL_UCHAR_MAX 255
145 #define CL_SHRT_MAX 32767
146 #define CL_SHRT_MIN (-32767-1)
147 #define CL_USHRT_MAX 65535
148 #define CL_INT_MAX 2147483647
149 #define CL_INT_MIN (-2147483647-1)
150 #define CL_UINT_MAX 0xffffffffU
151 #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
152 #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
153 #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
156 #define CL_FLT_MANT_DIG 24
157 #define CL_FLT_MAX_10_EXP +38
158 #define CL_FLT_MAX_EXP +128
159 #define CL_FLT_MIN_10_EXP -37
160 #define CL_FLT_MIN_EXP -125
161 #define CL_FLT_RADIX 2
162 #define CL_FLT_MAX 340282346638528859811704183484516925440.0f
163 #define CL_FLT_MIN 1.175494350822287507969e-38f
164 #define CL_FLT_EPSILON 1.1920928955078125e-7f
166 #define CL_HALF_DIG 3
167 #define CL_HALF_MANT_DIG 11
168 #define CL_HALF_MAX_10_EXP +4
169 #define CL_HALF_MAX_EXP +16
170 #define CL_HALF_MIN_10_EXP -4
171 #define CL_HALF_MIN_EXP -13
172 #define CL_HALF_RADIX 2
173 #define CL_HALF_MAX 65504.0f
174 #define CL_HALF_MIN 6.103515625e-05f
175 #define CL_HALF_EPSILON 9.765625e-04f
177 #define CL_DBL_DIG 15
178 #define CL_DBL_MANT_DIG 53
179 #define CL_DBL_MAX_10_EXP +308
180 #define CL_DBL_MAX_EXP +1024
181 #define CL_DBL_MIN_10_EXP -307
182 #define CL_DBL_MIN_EXP -1021
183 #define CL_DBL_RADIX 2
184 #define CL_DBL_MAX 1.7976931348623158e+308
185 #define CL_DBL_MIN 2.225073858507201383090e-308
186 #define CL_DBL_EPSILON 2.220446049250313080847e-16
188 #define CL_M_E 2.7182818284590452354
189 #define CL_M_LOG2E 1.4426950408889634074
190 #define CL_M_LOG10E 0.43429448190325182765
191 #define CL_M_LN2 0.69314718055994530942
192 #define CL_M_LN10 2.30258509299404568402
193 #define CL_M_PI 3.14159265358979323846
194 #define CL_M_PI_2 1.57079632679489661923
195 #define CL_M_PI_4 0.78539816339744830962
196 #define CL_M_1_PI 0.31830988618379067154
197 #define CL_M_2_PI 0.63661977236758134308
198 #define CL_M_2_SQRTPI 1.12837916709551257390
199 #define CL_M_SQRT2 1.41421356237309504880
200 #define CL_M_SQRT1_2 0.70710678118654752440
202 #define CL_M_E_F 2.718281828f
203 #define CL_M_LOG2E_F 1.442695041f
204 #define CL_M_LOG10E_F 0.434294482f
205 #define CL_M_LN2_F 0.693147181f
206 #define CL_M_LN10_F 2.302585093f
207 #define CL_M_PI_F 3.141592654f
208 #define CL_M_PI_2_F 1.570796327f
209 #define CL_M_PI_4_F 0.785398163f
210 #define CL_M_1_PI_F 0.318309886f
211 #define CL_M_2_PI_F 0.636619772f
212 #define CL_M_2_SQRTPI_F 1.128379167f
213 #define CL_M_SQRT2_F 1.414213562f
214 #define CL_M_SQRT1_2_F 0.707106781f
216 #define CL_NAN (CL_INFINITY - CL_INFINITY)
217 #define CL_HUGE_VALF ((cl_float) 1e50)
218 #define CL_HUGE_VAL ((cl_double) 1e500)
219 #define CL_MAXFLOAT CL_FLT_MAX
220 #define CL_INFINITY CL_HUGE_VALF
227 typedef int8_t cl_char
;
228 typedef uint8_t cl_uchar
;
229 typedef int16_t cl_short
;
230 typedef uint16_t cl_ushort
;
231 typedef int32_t cl_int
;
232 typedef uint32_t cl_uint
;
233 typedef int64_t cl_long
;
234 typedef uint64_t cl_ulong
;
236 typedef uint16_t cl_half
;
237 typedef float cl_float
;
238 typedef double cl_double
;
240 /* Macro names and corresponding values defined by OpenCL */
241 #define CL_CHAR_BIT 8
242 #define CL_SCHAR_MAX 127
243 #define CL_SCHAR_MIN (-127-1)
244 #define CL_CHAR_MAX CL_SCHAR_MAX
245 #define CL_CHAR_MIN CL_SCHAR_MIN
246 #define CL_UCHAR_MAX 255
247 #define CL_SHRT_MAX 32767
248 #define CL_SHRT_MIN (-32767-1)
249 #define CL_USHRT_MAX 65535
250 #define CL_INT_MAX 2147483647
251 #define CL_INT_MIN (-2147483647-1)
252 #define CL_UINT_MAX 0xffffffffU
253 #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
254 #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
255 #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
258 #define CL_FLT_MANT_DIG 24
259 #define CL_FLT_MAX_10_EXP +38
260 #define CL_FLT_MAX_EXP +128
261 #define CL_FLT_MIN_10_EXP -37
262 #define CL_FLT_MIN_EXP -125
263 #define CL_FLT_RADIX 2
264 #define CL_FLT_MAX 340282346638528859811704183484516925440.0f
265 #define CL_FLT_MIN 1.175494350822287507969e-38f
266 #define CL_FLT_EPSILON 1.1920928955078125e-7f
268 #define CL_HALF_DIG 3
269 #define CL_HALF_MANT_DIG 11
270 #define CL_HALF_MAX_10_EXP +4
271 #define CL_HALF_MAX_EXP +16
272 #define CL_HALF_MIN_10_EXP -4
273 #define CL_HALF_MIN_EXP -13
274 #define CL_HALF_RADIX 2
275 #define CL_HALF_MAX 65504.0f
276 #define CL_HALF_MIN 6.103515625e-05f
277 #define CL_HALF_EPSILON 9.765625e-04f
279 #define CL_DBL_DIG 15
280 #define CL_DBL_MANT_DIG 53
281 #define CL_DBL_MAX_10_EXP +308
282 #define CL_DBL_MAX_EXP +1024
283 #define CL_DBL_MIN_10_EXP -307
284 #define CL_DBL_MIN_EXP -1021
285 #define CL_DBL_RADIX 2
286 #define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
287 #define CL_DBL_MIN 2.225073858507201383090e-308
288 #define CL_DBL_EPSILON 2.220446049250313080847e-16
290 #define CL_M_E 2.7182818284590452354
291 #define CL_M_LOG2E 1.4426950408889634074
292 #define CL_M_LOG10E 0.43429448190325182765
293 #define CL_M_LN2 0.69314718055994530942
294 #define CL_M_LN10 2.30258509299404568402
295 #define CL_M_PI 3.14159265358979323846
296 #define CL_M_PI_2 1.57079632679489661923
297 #define CL_M_PI_4 0.78539816339744830962
298 #define CL_M_1_PI 0.31830988618379067154
299 #define CL_M_2_PI 0.63661977236758134308
300 #define CL_M_2_SQRTPI 1.12837916709551257390
301 #define CL_M_SQRT2 1.41421356237309504880
302 #define CL_M_SQRT1_2 0.70710678118654752440
304 #define CL_M_E_F 2.718281828f
305 #define CL_M_LOG2E_F 1.442695041f
306 #define CL_M_LOG10E_F 0.434294482f
307 #define CL_M_LN2_F 0.693147181f
308 #define CL_M_LN10_F 2.302585093f
309 #define CL_M_PI_F 3.141592654f
310 #define CL_M_PI_2_F 1.570796327f
311 #define CL_M_PI_4_F 0.785398163f
312 #define CL_M_1_PI_F 0.318309886f
313 #define CL_M_2_PI_F 0.636619772f
314 #define CL_M_2_SQRTPI_F 1.128379167f
315 #define CL_M_SQRT2_F 1.414213562f
316 #define CL_M_SQRT1_2_F 0.707106781f
318 #if defined( __GNUC__ )
319 #define CL_HUGE_VALF __builtin_huge_valf()
320 #define CL_HUGE_VAL __builtin_huge_val()
321 #define CL_NAN __builtin_nanf( "" )
323 #define CL_HUGE_VALF ((cl_float) 1e50)
324 #define CL_HUGE_VAL ((cl_double) 1e500)
325 float nanf( const char * );
326 #define CL_NAN nanf( "" )
328 #define CL_MAXFLOAT CL_FLT_MAX
329 #define CL_INFINITY CL_HUGE_VALF
335 /* Mirror types to GL types. Mirror types allow us to avoid deciding which 87s to load based on whether we are using GL or GLES here. */
336 typedef unsigned int cl_GLuint
;
337 typedef int cl_GLint
;
338 typedef unsigned int cl_GLenum
;
343 * Note: OpenCL requires that all types be naturally aligned.
344 * This means that vector types must be naturally aligned.
345 * For example, a vector of four floats must be aligned to
346 * a 16 byte boundary (calculated as 4 * the natural 4-byte
347 * alignment of the float). The alignment qualifiers here
348 * will only function properly if your compiler supports them
349 * and if you don't actively work to defeat them. For example,
350 * in order for a cl_float4 to be 16 byte aligned in a struct,
351 * the start of the struct must itself be 16-byte aligned.
353 * Maintaining proper alignment is the user's responsibility.
356 /* Define basic vector types */
357 #if defined( __VEC__ )
358 #include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
359 typedef __vector
unsigned char __cl_uchar16
;
360 typedef __vector
signed char __cl_char16
;
361 typedef __vector
unsigned short __cl_ushort8
;
362 typedef __vector
signed short __cl_short8
;
363 typedef __vector
unsigned int __cl_uint4
;
364 typedef __vector
signed int __cl_int4
;
365 typedef __vector
float __cl_float4
;
366 #define __CL_UCHAR16__ 1
367 #define __CL_CHAR16__ 1
368 #define __CL_USHORT8__ 1
369 #define __CL_SHORT8__ 1
370 #define __CL_UINT4__ 1
371 #define __CL_INT4__ 1
372 #define __CL_FLOAT4__ 1
375 #if defined( __SSE__ )
376 #if defined( __MINGW64__ )
379 #include <xmmintrin.h>
381 #if defined( __GNUC__ )
382 typedef float __cl_float4
__attribute__((vector_size(16)));
384 typedef __m128 __cl_float4
;
386 #define __CL_FLOAT4__ 1
389 #if defined( __SSE2__ )
390 #if defined( __MINGW64__ )
393 #include <emmintrin.h>
395 #if defined( __GNUC__ )
396 typedef cl_uchar __cl_uchar16
__attribute__((vector_size(16)));
397 typedef cl_char __cl_char16
__attribute__((vector_size(16)));
398 typedef cl_ushort __cl_ushort8
__attribute__((vector_size(16)));
399 typedef cl_short __cl_short8
__attribute__((vector_size(16)));
400 typedef cl_uint __cl_uint4
__attribute__((vector_size(16)));
401 typedef cl_int __cl_int4
__attribute__((vector_size(16)));
402 typedef cl_ulong __cl_ulong2
__attribute__((vector_size(16)));
403 typedef cl_long __cl_long2
__attribute__((vector_size(16)));
404 typedef cl_double __cl_double2
__attribute__((vector_size(16)));
406 typedef __m128i __cl_uchar16
;
407 typedef __m128i __cl_char16
;
408 typedef __m128i __cl_ushort8
;
409 typedef __m128i __cl_short8
;
410 typedef __m128i __cl_uint4
;
411 typedef __m128i __cl_int4
;
412 typedef __m128i __cl_ulong2
;
413 typedef __m128i __cl_long2
;
414 typedef __m128d __cl_double2
;
416 #define __CL_UCHAR16__ 1
417 #define __CL_CHAR16__ 1
418 #define __CL_USHORT8__ 1
419 #define __CL_SHORT8__ 1
420 #define __CL_INT4__ 1
421 #define __CL_UINT4__ 1
422 #define __CL_ULONG2__ 1
423 #define __CL_LONG2__ 1
424 #define __CL_DOUBLE2__ 1
427 #if defined( __MMX__ )
428 #include <mmintrin.h>
429 #if defined( __GNUC__ )
430 typedef cl_uchar __cl_uchar8
__attribute__((vector_size(8)));
431 typedef cl_char __cl_char8
__attribute__((vector_size(8)));
432 typedef cl_ushort __cl_ushort4
__attribute__((vector_size(8)));
433 typedef cl_short __cl_short4
__attribute__((vector_size(8)));
434 typedef cl_uint __cl_uint2
__attribute__((vector_size(8)));
435 typedef cl_int __cl_int2
__attribute__((vector_size(8)));
436 typedef cl_ulong __cl_ulong1
__attribute__((vector_size(8)));
437 typedef cl_long __cl_long1
__attribute__((vector_size(8)));
438 typedef cl_float __cl_float2
__attribute__((vector_size(8)));
440 typedef __m64 __cl_uchar8
;
441 typedef __m64 __cl_char8
;
442 typedef __m64 __cl_ushort4
;
443 typedef __m64 __cl_short4
;
444 typedef __m64 __cl_uint2
;
445 typedef __m64 __cl_int2
;
446 typedef __m64 __cl_ulong1
;
447 typedef __m64 __cl_long1
;
448 typedef __m64 __cl_float2
;
450 #define __CL_UCHAR8__ 1
451 #define __CL_CHAR8__ 1
452 #define __CL_USHORT4__ 1
453 #define __CL_SHORT4__ 1
454 #define __CL_INT2__ 1
455 #define __CL_UINT2__ 1
456 #define __CL_ULONG1__ 1
457 #define __CL_LONG1__ 1
458 #define __CL_FLOAT2__ 1
461 #if defined( __AVX__ )
462 #if defined( __MINGW64__ )
465 #include <immintrin.h>
467 #if defined( __GNUC__ )
468 typedef cl_float __cl_float8
__attribute__((vector_size(32)));
469 typedef cl_double __cl_double4
__attribute__((vector_size(32)));
471 typedef __m256 __cl_float8
;
472 typedef __m256d __cl_double4
;
474 #define __CL_FLOAT8__ 1
475 #define __CL_DOUBLE4__ 1
478 /* Define capabilities for anonymous struct members. */
479 #if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
480 #define __CL_HAS_ANON_STRUCT__ 1
481 #define __CL_ANON_STRUCT__
482 #elif defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
483 #define __CL_HAS_ANON_STRUCT__ 1
484 #define __CL_ANON_STRUCT__ __extension__
485 #elif defined( _WIN32) && defined(_MSC_VER)
487 /* Microsoft Developer Studio 2008 supports anonymous structs, but
488 * complains by default. */
489 #define __CL_HAS_ANON_STRUCT__ 1
490 #define __CL_ANON_STRUCT__
491 /* Disable warning C4201: nonstandard extension used : nameless
493 #pragma warning( push )
494 #pragma warning( disable : 4201 )
497 #define __CL_HAS_ANON_STRUCT__ 0
498 #define __CL_ANON_STRUCT__
501 /* Define alignment keys */
502 #if defined( __GNUC__ )
503 #define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
504 #elif defined( _WIN32) && (_MSC_VER)
505 /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
506 /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */
507 /* #include <crtdefs.h> */
508 /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */
509 #define CL_ALIGNED(_x)
511 #warning Need to implement some method to align data here
512 #define CL_ALIGNED(_x)
515 /* Indicate whether .xyzw, .s0123 and .hi.lo are supported */
516 #if __CL_HAS_ANON_STRUCT__
517 /* .xyzw and .s0123...{f|F} are supported */
518 #define CL_HAS_NAMED_VECTOR_FIELDS 1
519 /* .hi and .lo are supported */
520 #define CL_HAS_HI_LO_VECTOR_FIELDS 1
523 /* Define cl_vector types */
525 /* ---- cl_charn ---- */
528 cl_char
CL_ALIGNED(2) s
[2];
529 #if __CL_HAS_ANON_STRUCT__
530 __CL_ANON_STRUCT__
struct{ cl_char x
, y
; };
531 __CL_ANON_STRUCT__
struct{ cl_char s0
, s1
; };
532 __CL_ANON_STRUCT__
struct{ cl_char lo
, hi
; };
534 #if defined( __CL_CHAR2__)
541 cl_char
CL_ALIGNED(4) s
[4];
542 #if __CL_HAS_ANON_STRUCT__
543 __CL_ANON_STRUCT__
struct{ cl_char x
, y
, z
, w
; };
544 __CL_ANON_STRUCT__
struct{ cl_char s0
, s1
, s2
, s3
; };
545 __CL_ANON_STRUCT__
struct{ cl_char2 lo
, hi
; };
547 #if defined( __CL_CHAR2__)
550 #if defined( __CL_CHAR4__)
555 /* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */
556 typedef cl_char4 cl_char3
;
560 cl_char
CL_ALIGNED(8) s
[8];
561 #if __CL_HAS_ANON_STRUCT__
562 __CL_ANON_STRUCT__
struct{ cl_char x
, y
, z
, w
; };
563 __CL_ANON_STRUCT__
struct{ cl_char s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
564 __CL_ANON_STRUCT__
struct{ cl_char4 lo
, hi
; };
566 #if defined( __CL_CHAR2__)
569 #if defined( __CL_CHAR4__)
572 #if defined( __CL_CHAR8__ )
579 cl_char
CL_ALIGNED(16) s
[16];
580 #if __CL_HAS_ANON_STRUCT__
581 __CL_ANON_STRUCT__
struct{ cl_char x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
582 __CL_ANON_STRUCT__
struct{ cl_char s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
583 __CL_ANON_STRUCT__
struct{ cl_char8 lo
, hi
; };
585 #if defined( __CL_CHAR2__)
588 #if defined( __CL_CHAR4__)
591 #if defined( __CL_CHAR8__ )
594 #if defined( __CL_CHAR16__ )
600 /* ---- cl_ucharn ---- */
603 cl_uchar
CL_ALIGNED(2) s
[2];
604 #if __CL_HAS_ANON_STRUCT__
605 __CL_ANON_STRUCT__
struct{ cl_uchar x
, y
; };
606 __CL_ANON_STRUCT__
struct{ cl_uchar s0
, s1
; };
607 __CL_ANON_STRUCT__
struct{ cl_uchar lo
, hi
; };
609 #if defined( __cl_uchar2__)
616 cl_uchar
CL_ALIGNED(4) s
[4];
617 #if __CL_HAS_ANON_STRUCT__
618 __CL_ANON_STRUCT__
struct{ cl_uchar x
, y
, z
, w
; };
619 __CL_ANON_STRUCT__
struct{ cl_uchar s0
, s1
, s2
, s3
; };
620 __CL_ANON_STRUCT__
struct{ cl_uchar2 lo
, hi
; };
622 #if defined( __CL_UCHAR2__)
625 #if defined( __CL_UCHAR4__)
630 /* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */
631 typedef cl_uchar4 cl_uchar3
;
635 cl_uchar
CL_ALIGNED(8) s
[8];
636 #if __CL_HAS_ANON_STRUCT__
637 __CL_ANON_STRUCT__
struct{ cl_uchar x
, y
, z
, w
; };
638 __CL_ANON_STRUCT__
struct{ cl_uchar s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
639 __CL_ANON_STRUCT__
struct{ cl_uchar4 lo
, hi
; };
641 #if defined( __CL_UCHAR2__)
644 #if defined( __CL_UCHAR4__)
647 #if defined( __CL_UCHAR8__ )
654 cl_uchar
CL_ALIGNED(16) s
[16];
655 #if __CL_HAS_ANON_STRUCT__
656 __CL_ANON_STRUCT__
struct{ cl_uchar x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
657 __CL_ANON_STRUCT__
struct{ cl_uchar s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
658 __CL_ANON_STRUCT__
struct{ cl_uchar8 lo
, hi
; };
660 #if defined( __CL_UCHAR2__)
663 #if defined( __CL_UCHAR4__)
666 #if defined( __CL_UCHAR8__ )
669 #if defined( __CL_UCHAR16__ )
675 /* ---- cl_shortn ---- */
678 cl_short
CL_ALIGNED(4) s
[2];
679 #if __CL_HAS_ANON_STRUCT__
680 __CL_ANON_STRUCT__
struct{ cl_short x
, y
; };
681 __CL_ANON_STRUCT__
struct{ cl_short s0
, s1
; };
682 __CL_ANON_STRUCT__
struct{ cl_short lo
, hi
; };
684 #if defined( __CL_SHORT2__)
691 cl_short
CL_ALIGNED(8) s
[4];
692 #if __CL_HAS_ANON_STRUCT__
693 __CL_ANON_STRUCT__
struct{ cl_short x
, y
, z
, w
; };
694 __CL_ANON_STRUCT__
struct{ cl_short s0
, s1
, s2
, s3
; };
695 __CL_ANON_STRUCT__
struct{ cl_short2 lo
, hi
; };
697 #if defined( __CL_SHORT2__)
700 #if defined( __CL_SHORT4__)
705 /* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */
706 typedef cl_short4 cl_short3
;
710 cl_short
CL_ALIGNED(16) s
[8];
711 #if __CL_HAS_ANON_STRUCT__
712 __CL_ANON_STRUCT__
struct{ cl_short x
, y
, z
, w
; };
713 __CL_ANON_STRUCT__
struct{ cl_short s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
714 __CL_ANON_STRUCT__
struct{ cl_short4 lo
, hi
; };
716 #if defined( __CL_SHORT2__)
719 #if defined( __CL_SHORT4__)
722 #if defined( __CL_SHORT8__ )
729 cl_short
CL_ALIGNED(32) s
[16];
730 #if __CL_HAS_ANON_STRUCT__
731 __CL_ANON_STRUCT__
struct{ cl_short x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
732 __CL_ANON_STRUCT__
struct{ cl_short s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
733 __CL_ANON_STRUCT__
struct{ cl_short8 lo
, hi
; };
735 #if defined( __CL_SHORT2__)
738 #if defined( __CL_SHORT4__)
741 #if defined( __CL_SHORT8__ )
744 #if defined( __CL_SHORT16__ )
750 /* ---- cl_ushortn ---- */
753 cl_ushort
CL_ALIGNED(4) s
[2];
754 #if __CL_HAS_ANON_STRUCT__
755 __CL_ANON_STRUCT__
struct{ cl_ushort x
, y
; };
756 __CL_ANON_STRUCT__
struct{ cl_ushort s0
, s1
; };
757 __CL_ANON_STRUCT__
struct{ cl_ushort lo
, hi
; };
759 #if defined( __CL_USHORT2__)
766 cl_ushort
CL_ALIGNED(8) s
[4];
767 #if __CL_HAS_ANON_STRUCT__
768 __CL_ANON_STRUCT__
struct{ cl_ushort x
, y
, z
, w
; };
769 __CL_ANON_STRUCT__
struct{ cl_ushort s0
, s1
, s2
, s3
; };
770 __CL_ANON_STRUCT__
struct{ cl_ushort2 lo
, hi
; };
772 #if defined( __CL_USHORT2__)
775 #if defined( __CL_USHORT4__)
780 /* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */
781 typedef cl_ushort4 cl_ushort3
;
785 cl_ushort
CL_ALIGNED(16) s
[8];
786 #if __CL_HAS_ANON_STRUCT__
787 __CL_ANON_STRUCT__
struct{ cl_ushort x
, y
, z
, w
; };
788 __CL_ANON_STRUCT__
struct{ cl_ushort s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
789 __CL_ANON_STRUCT__
struct{ cl_ushort4 lo
, hi
; };
791 #if defined( __CL_USHORT2__)
794 #if defined( __CL_USHORT4__)
797 #if defined( __CL_USHORT8__ )
804 cl_ushort
CL_ALIGNED(32) s
[16];
805 #if __CL_HAS_ANON_STRUCT__
806 __CL_ANON_STRUCT__
struct{ cl_ushort x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
807 __CL_ANON_STRUCT__
struct{ cl_ushort s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
808 __CL_ANON_STRUCT__
struct{ cl_ushort8 lo
, hi
; };
810 #if defined( __CL_USHORT2__)
813 #if defined( __CL_USHORT4__)
816 #if defined( __CL_USHORT8__ )
819 #if defined( __CL_USHORT16__ )
825 /* ---- cl_halfn ---- */
828 cl_half
CL_ALIGNED(4) s
[2];
829 #if __CL_HAS_ANON_STRUCT__
830 __CL_ANON_STRUCT__
struct{ cl_half x
, y
; };
831 __CL_ANON_STRUCT__
struct{ cl_half s0
, s1
; };
832 __CL_ANON_STRUCT__
struct{ cl_half lo
, hi
; };
834 #if defined( __CL_HALF2__)
841 cl_half
CL_ALIGNED(8) s
[4];
842 #if __CL_HAS_ANON_STRUCT__
843 __CL_ANON_STRUCT__
struct{ cl_half x
, y
, z
, w
; };
844 __CL_ANON_STRUCT__
struct{ cl_half s0
, s1
, s2
, s3
; };
845 __CL_ANON_STRUCT__
struct{ cl_half2 lo
, hi
; };
847 #if defined( __CL_HALF2__)
850 #if defined( __CL_HALF4__)
855 /* cl_half3 is identical in size, alignment and behavior to cl_half4. See section 6.1.5. */
856 typedef cl_half4 cl_half3
;
860 cl_half
CL_ALIGNED(16) s
[8];
861 #if __CL_HAS_ANON_STRUCT__
862 __CL_ANON_STRUCT__
struct{ cl_half x
, y
, z
, w
; };
863 __CL_ANON_STRUCT__
struct{ cl_half s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
864 __CL_ANON_STRUCT__
struct{ cl_half4 lo
, hi
; };
866 #if defined( __CL_HALF2__)
869 #if defined( __CL_HALF4__)
872 #if defined( __CL_HALF8__ )
879 cl_half
CL_ALIGNED(32) s
[16];
880 #if __CL_HAS_ANON_STRUCT__
881 __CL_ANON_STRUCT__
struct{ cl_half x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
882 __CL_ANON_STRUCT__
struct{ cl_half s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
883 __CL_ANON_STRUCT__
struct{ cl_half8 lo
, hi
; };
885 #if defined( __CL_HALF2__)
888 #if defined( __CL_HALF4__)
891 #if defined( __CL_HALF8__ )
894 #if defined( __CL_HALF16__ )
899 /* ---- cl_intn ---- */
902 cl_int
CL_ALIGNED(8) s
[2];
903 #if __CL_HAS_ANON_STRUCT__
904 __CL_ANON_STRUCT__
struct{ cl_int x
, y
; };
905 __CL_ANON_STRUCT__
struct{ cl_int s0
, s1
; };
906 __CL_ANON_STRUCT__
struct{ cl_int lo
, hi
; };
908 #if defined( __CL_INT2__)
915 cl_int
CL_ALIGNED(16) s
[4];
916 #if __CL_HAS_ANON_STRUCT__
917 __CL_ANON_STRUCT__
struct{ cl_int x
, y
, z
, w
; };
918 __CL_ANON_STRUCT__
struct{ cl_int s0
, s1
, s2
, s3
; };
919 __CL_ANON_STRUCT__
struct{ cl_int2 lo
, hi
; };
921 #if defined( __CL_INT2__)
924 #if defined( __CL_INT4__)
929 /* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */
930 typedef cl_int4 cl_int3
;
934 cl_int
CL_ALIGNED(32) s
[8];
935 #if __CL_HAS_ANON_STRUCT__
936 __CL_ANON_STRUCT__
struct{ cl_int x
, y
, z
, w
; };
937 __CL_ANON_STRUCT__
struct{ cl_int s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
938 __CL_ANON_STRUCT__
struct{ cl_int4 lo
, hi
; };
940 #if defined( __CL_INT2__)
943 #if defined( __CL_INT4__)
946 #if defined( __CL_INT8__ )
953 cl_int
CL_ALIGNED(64) s
[16];
954 #if __CL_HAS_ANON_STRUCT__
955 __CL_ANON_STRUCT__
struct{ cl_int x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
956 __CL_ANON_STRUCT__
struct{ cl_int s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
957 __CL_ANON_STRUCT__
struct{ cl_int8 lo
, hi
; };
959 #if defined( __CL_INT2__)
962 #if defined( __CL_INT4__)
965 #if defined( __CL_INT8__ )
968 #if defined( __CL_INT16__ )
974 /* ---- cl_uintn ---- */
977 cl_uint
CL_ALIGNED(8) s
[2];
978 #if __CL_HAS_ANON_STRUCT__
979 __CL_ANON_STRUCT__
struct{ cl_uint x
, y
; };
980 __CL_ANON_STRUCT__
struct{ cl_uint s0
, s1
; };
981 __CL_ANON_STRUCT__
struct{ cl_uint lo
, hi
; };
983 #if defined( __CL_UINT2__)
990 cl_uint
CL_ALIGNED(16) s
[4];
991 #if __CL_HAS_ANON_STRUCT__
992 __CL_ANON_STRUCT__
struct{ cl_uint x
, y
, z
, w
; };
993 __CL_ANON_STRUCT__
struct{ cl_uint s0
, s1
, s2
, s3
; };
994 __CL_ANON_STRUCT__
struct{ cl_uint2 lo
, hi
; };
996 #if defined( __CL_UINT2__)
999 #if defined( __CL_UINT4__)
1004 /* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */
1005 typedef cl_uint4 cl_uint3
;
1009 cl_uint
CL_ALIGNED(32) s
[8];
1010 #if __CL_HAS_ANON_STRUCT__
1011 __CL_ANON_STRUCT__
struct{ cl_uint x
, y
, z
, w
; };
1012 __CL_ANON_STRUCT__
struct{ cl_uint s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
1013 __CL_ANON_STRUCT__
struct{ cl_uint4 lo
, hi
; };
1015 #if defined( __CL_UINT2__)
1018 #if defined( __CL_UINT4__)
1021 #if defined( __CL_UINT8__ )
1028 cl_uint
CL_ALIGNED(64) s
[16];
1029 #if __CL_HAS_ANON_STRUCT__
1030 __CL_ANON_STRUCT__
struct{ cl_uint x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
1031 __CL_ANON_STRUCT__
struct{ cl_uint s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
1032 __CL_ANON_STRUCT__
struct{ cl_uint8 lo
, hi
; };
1034 #if defined( __CL_UINT2__)
1037 #if defined( __CL_UINT4__)
1040 #if defined( __CL_UINT8__ )
1043 #if defined( __CL_UINT16__ )
1048 /* ---- cl_longn ---- */
1051 cl_long
CL_ALIGNED(16) s
[2];
1052 #if __CL_HAS_ANON_STRUCT__
1053 __CL_ANON_STRUCT__
struct{ cl_long x
, y
; };
1054 __CL_ANON_STRUCT__
struct{ cl_long s0
, s1
; };
1055 __CL_ANON_STRUCT__
struct{ cl_long lo
, hi
; };
1057 #if defined( __CL_LONG2__)
1064 cl_long
CL_ALIGNED(32) s
[4];
1065 #if __CL_HAS_ANON_STRUCT__
1066 __CL_ANON_STRUCT__
struct{ cl_long x
, y
, z
, w
; };
1067 __CL_ANON_STRUCT__
struct{ cl_long s0
, s1
, s2
, s3
; };
1068 __CL_ANON_STRUCT__
struct{ cl_long2 lo
, hi
; };
1070 #if defined( __CL_LONG2__)
1073 #if defined( __CL_LONG4__)
1078 /* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */
1079 typedef cl_long4 cl_long3
;
1083 cl_long
CL_ALIGNED(64) s
[8];
1084 #if __CL_HAS_ANON_STRUCT__
1085 __CL_ANON_STRUCT__
struct{ cl_long x
, y
, z
, w
; };
1086 __CL_ANON_STRUCT__
struct{ cl_long s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
1087 __CL_ANON_STRUCT__
struct{ cl_long4 lo
, hi
; };
1089 #if defined( __CL_LONG2__)
1092 #if defined( __CL_LONG4__)
1095 #if defined( __CL_LONG8__ )
1102 cl_long
CL_ALIGNED(128) s
[16];
1103 #if __CL_HAS_ANON_STRUCT__
1104 __CL_ANON_STRUCT__
struct{ cl_long x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
1105 __CL_ANON_STRUCT__
struct{ cl_long s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
1106 __CL_ANON_STRUCT__
struct{ cl_long8 lo
, hi
; };
1108 #if defined( __CL_LONG2__)
1111 #if defined( __CL_LONG4__)
1114 #if defined( __CL_LONG8__ )
1117 #if defined( __CL_LONG16__ )
1123 /* ---- cl_ulongn ---- */
1126 cl_ulong
CL_ALIGNED(16) s
[2];
1127 #if __CL_HAS_ANON_STRUCT__
1128 __CL_ANON_STRUCT__
struct{ cl_ulong x
, y
; };
1129 __CL_ANON_STRUCT__
struct{ cl_ulong s0
, s1
; };
1130 __CL_ANON_STRUCT__
struct{ cl_ulong lo
, hi
; };
1132 #if defined( __CL_ULONG2__)
1139 cl_ulong
CL_ALIGNED(32) s
[4];
1140 #if __CL_HAS_ANON_STRUCT__
1141 __CL_ANON_STRUCT__
struct{ cl_ulong x
, y
, z
, w
; };
1142 __CL_ANON_STRUCT__
struct{ cl_ulong s0
, s1
, s2
, s3
; };
1143 __CL_ANON_STRUCT__
struct{ cl_ulong2 lo
, hi
; };
1145 #if defined( __CL_ULONG2__)
1148 #if defined( __CL_ULONG4__)
1153 /* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */
1154 typedef cl_ulong4 cl_ulong3
;
1158 cl_ulong
CL_ALIGNED(64) s
[8];
1159 #if __CL_HAS_ANON_STRUCT__
1160 __CL_ANON_STRUCT__
struct{ cl_ulong x
, y
, z
, w
; };
1161 __CL_ANON_STRUCT__
struct{ cl_ulong s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
1162 __CL_ANON_STRUCT__
struct{ cl_ulong4 lo
, hi
; };
1164 #if defined( __CL_ULONG2__)
1167 #if defined( __CL_ULONG4__)
1170 #if defined( __CL_ULONG8__ )
1177 cl_ulong
CL_ALIGNED(128) s
[16];
1178 #if __CL_HAS_ANON_STRUCT__
1179 __CL_ANON_STRUCT__
struct{ cl_ulong x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
1180 __CL_ANON_STRUCT__
struct{ cl_ulong s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
1181 __CL_ANON_STRUCT__
struct{ cl_ulong8 lo
, hi
; };
1183 #if defined( __CL_ULONG2__)
1186 #if defined( __CL_ULONG4__)
1189 #if defined( __CL_ULONG8__ )
1192 #if defined( __CL_ULONG16__ )
1198 /* --- cl_floatn ---- */
1202 cl_float
CL_ALIGNED(8) s
[2];
1203 #if __CL_HAS_ANON_STRUCT__
1204 __CL_ANON_STRUCT__
struct{ cl_float x
, y
; };
1205 __CL_ANON_STRUCT__
struct{ cl_float s0
, s1
; };
1206 __CL_ANON_STRUCT__
struct{ cl_float lo
, hi
; };
1208 #if defined( __CL_FLOAT2__)
1215 cl_float
CL_ALIGNED(16) s
[4];
1216 #if __CL_HAS_ANON_STRUCT__
1217 __CL_ANON_STRUCT__
struct{ cl_float x
, y
, z
, w
; };
1218 __CL_ANON_STRUCT__
struct{ cl_float s0
, s1
, s2
, s3
; };
1219 __CL_ANON_STRUCT__
struct{ cl_float2 lo
, hi
; };
1221 #if defined( __CL_FLOAT2__)
1224 #if defined( __CL_FLOAT4__)
1229 /* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */
1230 typedef cl_float4 cl_float3
;
1234 cl_float
CL_ALIGNED(32) s
[8];
1235 #if __CL_HAS_ANON_STRUCT__
1236 __CL_ANON_STRUCT__
struct{ cl_float x
, y
, z
, w
; };
1237 __CL_ANON_STRUCT__
struct{ cl_float s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
1238 __CL_ANON_STRUCT__
struct{ cl_float4 lo
, hi
; };
1240 #if defined( __CL_FLOAT2__)
1243 #if defined( __CL_FLOAT4__)
1246 #if defined( __CL_FLOAT8__ )
1253 cl_float
CL_ALIGNED(64) s
[16];
1254 #if __CL_HAS_ANON_STRUCT__
1255 __CL_ANON_STRUCT__
struct{ cl_float x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
1256 __CL_ANON_STRUCT__
struct{ cl_float s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
1257 __CL_ANON_STRUCT__
struct{ cl_float8 lo
, hi
; };
1259 #if defined( __CL_FLOAT2__)
1262 #if defined( __CL_FLOAT4__)
1265 #if defined( __CL_FLOAT8__ )
1268 #if defined( __CL_FLOAT16__ )
1273 /* --- cl_doublen ---- */
1277 cl_double
CL_ALIGNED(16) s
[2];
1278 #if __CL_HAS_ANON_STRUCT__
1279 __CL_ANON_STRUCT__
struct{ cl_double x
, y
; };
1280 __CL_ANON_STRUCT__
struct{ cl_double s0
, s1
; };
1281 __CL_ANON_STRUCT__
struct{ cl_double lo
, hi
; };
1283 #if defined( __CL_DOUBLE2__)
1290 cl_double
CL_ALIGNED(32) s
[4];
1291 #if __CL_HAS_ANON_STRUCT__
1292 __CL_ANON_STRUCT__
struct{ cl_double x
, y
, z
, w
; };
1293 __CL_ANON_STRUCT__
struct{ cl_double s0
, s1
, s2
, s3
; };
1294 __CL_ANON_STRUCT__
struct{ cl_double2 lo
, hi
; };
1296 #if defined( __CL_DOUBLE2__)
1299 #if defined( __CL_DOUBLE4__)
1304 /* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */
1305 typedef cl_double4 cl_double3
;
1309 cl_double
CL_ALIGNED(64) s
[8];
1310 #if __CL_HAS_ANON_STRUCT__
1311 __CL_ANON_STRUCT__
struct{ cl_double x
, y
, z
, w
; };
1312 __CL_ANON_STRUCT__
struct{ cl_double s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
1313 __CL_ANON_STRUCT__
struct{ cl_double4 lo
, hi
; };
1315 #if defined( __CL_DOUBLE2__)
1318 #if defined( __CL_DOUBLE4__)
1321 #if defined( __CL_DOUBLE8__ )
1328 cl_double
CL_ALIGNED(128) s
[16];
1329 #if __CL_HAS_ANON_STRUCT__
1330 __CL_ANON_STRUCT__
struct{ cl_double x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
1331 __CL_ANON_STRUCT__
struct{ cl_double s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
1332 __CL_ANON_STRUCT__
struct{ cl_double8 lo
, hi
; };
1334 #if defined( __CL_DOUBLE2__)
1337 #if defined( __CL_DOUBLE4__)
1340 #if defined( __CL_DOUBLE8__ )
1343 #if defined( __CL_DOUBLE16__ )
1348 /* Macro to facilitate debugging
1350 * Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source.
1351 * The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \"
1352 * Each line thereafter of OpenCL C source must end with: \n\
1353 * The last line ends in ";
1357 * const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\
1358 * kernel void foo( int a, float * b ) \n\
1361 * *b[ get_global_id(0)] = a; \n\
1365 * This should correctly set up the line, (column) and file information for your source
1366 * string so you can do source level debugging.
1368 #define __CL_STRINGIFY( _x ) # _x
1369 #define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x )
1370 #define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n"
1376 #undef __CL_HAS_ANON_STRUCT__
1377 #undef __CL_ANON_STRUCT__
1378 #if defined( _WIN32) && defined(_MSC_VER)
1380 #pragma warning( pop )
1384 #endif /* __CL_PLATFORM_H */