1 /**********************************************************************************
2 * Copyright (c) 2008-2012 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 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
22 **********************************************************************************/
24 /* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */
26 #ifndef __CL_PLATFORM_H
27 #define __CL_PLATFORM_H
30 /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */
31 #include <AvailabilityMacros.h>
40 #define CL_API_CALL __stdcall
41 #define CL_CALLBACK __stdcall
49 #define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
50 #define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
51 #define CL_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
52 #define CL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
53 #define GCL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
54 #define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
55 #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
57 #ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
58 #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
59 #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
60 #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
61 #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
62 #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
64 #warning This path should never happen outside of internal operating system development. AvailabilityMacros do not function correctly here!
65 #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
66 #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
67 #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
68 #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
71 #define CL_EXTENSION_WEAK_LINK
72 #define CL_API_SUFFIX__VERSION_1_0
73 #define CL_EXT_SUFFIX__VERSION_1_0
74 #define CL_API_SUFFIX__VERSION_1_1
75 #define CL_EXT_SUFFIX__VERSION_1_1
76 #define CL_API_SUFFIX__VERSION_1_2
77 #define CL_EXT_SUFFIX__VERSION_1_2
80 #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
81 #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
82 #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
84 #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED __attribute__((deprecated))
85 #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
88 #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
89 #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
90 #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
92 #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated))
93 #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
96 #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
97 #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
98 #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
100 #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
101 #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED __declspec(deprecated)
104 #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
105 #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
106 #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
108 #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
109 #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated)
112 #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
113 #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
115 #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
116 #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
120 #if (defined (_WIN32) && defined(_MSC_VER))
123 typedef signed __int8 cl_char
;
124 typedef unsigned __int8 cl_uchar
;
125 typedef signed __int16 cl_short
;
126 typedef unsigned __int16 cl_ushort
;
127 typedef signed __int32 cl_int
;
128 typedef unsigned __int32 cl_uint
;
129 typedef signed __int64 cl_long
;
130 typedef unsigned __int64 cl_ulong
;
132 typedef unsigned __int16 cl_half
;
133 typedef float cl_float
;
134 typedef double cl_double
;
136 /* Macro names and corresponding values defined by OpenCL */
137 #define CL_CHAR_BIT 8
138 #define CL_SCHAR_MAX 127
139 #define CL_SCHAR_MIN (-127-1)
140 #define CL_CHAR_MAX CL_SCHAR_MAX
141 #define CL_CHAR_MIN CL_SCHAR_MIN
142 #define CL_UCHAR_MAX 255
143 #define CL_SHRT_MAX 32767
144 #define CL_SHRT_MIN (-32767-1)
145 #define CL_USHRT_MAX 65535
146 #define CL_INT_MAX 2147483647
147 #define CL_INT_MIN (-2147483647-1)
148 #define CL_UINT_MAX 0xffffffffU
149 #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
150 #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
151 #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
154 #define CL_FLT_MANT_DIG 24
155 #define CL_FLT_MAX_10_EXP +38
156 #define CL_FLT_MAX_EXP +128
157 #define CL_FLT_MIN_10_EXP -37
158 #define CL_FLT_MIN_EXP -125
159 #define CL_FLT_RADIX 2
160 #define CL_FLT_MAX 340282346638528859811704183484516925440.0f
161 #define CL_FLT_MIN 1.175494350822287507969e-38f
162 #define CL_FLT_EPSILON 0x1.0p-23f
164 #define CL_DBL_DIG 15
165 #define CL_DBL_MANT_DIG 53
166 #define CL_DBL_MAX_10_EXP +308
167 #define CL_DBL_MAX_EXP +1024
168 #define CL_DBL_MIN_10_EXP -307
169 #define CL_DBL_MIN_EXP -1021
170 #define CL_DBL_RADIX 2
171 #define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
172 #define CL_DBL_MIN 2.225073858507201383090e-308
173 #define CL_DBL_EPSILON 2.220446049250313080847e-16
175 #define CL_M_E 2.718281828459045090796
176 #define CL_M_LOG2E 1.442695040888963387005
177 #define CL_M_LOG10E 0.434294481903251816668
178 #define CL_M_LN2 0.693147180559945286227
179 #define CL_M_LN10 2.302585092994045901094
180 #define CL_M_PI 3.141592653589793115998
181 #define CL_M_PI_2 1.570796326794896557999
182 #define CL_M_PI_4 0.785398163397448278999
183 #define CL_M_1_PI 0.318309886183790691216
184 #define CL_M_2_PI 0.636619772367581382433
185 #define CL_M_2_SQRTPI 1.128379167095512558561
186 #define CL_M_SQRT2 1.414213562373095145475
187 #define CL_M_SQRT1_2 0.707106781186547572737
189 #define CL_M_E_F 2.71828174591064f
190 #define CL_M_LOG2E_F 1.44269502162933f
191 #define CL_M_LOG10E_F 0.43429449200630f
192 #define CL_M_LN2_F 0.69314718246460f
193 #define CL_M_LN10_F 2.30258512496948f
194 #define CL_M_PI_F 3.14159274101257f
195 #define CL_M_PI_2_F 1.57079637050629f
196 #define CL_M_PI_4_F 0.78539818525314f
197 #define CL_M_1_PI_F 0.31830987334251f
198 #define CL_M_2_PI_F 0.63661974668503f
199 #define CL_M_2_SQRTPI_F 1.12837922573090f
200 #define CL_M_SQRT2_F 1.41421353816986f
201 #define CL_M_SQRT1_2_F 0.70710676908493f
203 #define CL_NAN (CL_INFINITY - CL_INFINITY)
204 #define CL_HUGE_VALF ((cl_float) 1e50)
205 #define CL_HUGE_VAL ((cl_double) 1e500)
206 #define CL_MAXFLOAT CL_FLT_MAX
207 #define CL_INFINITY CL_HUGE_VALF
214 typedef int8_t cl_char
;
215 typedef uint8_t cl_uchar
;
216 typedef int16_t cl_short
__attribute__((aligned(2)));
217 typedef uint16_t cl_ushort
__attribute__((aligned(2)));
218 typedef int32_t cl_int
__attribute__((aligned(4)));
219 typedef uint32_t cl_uint
__attribute__((aligned(4)));
220 typedef int64_t cl_long
__attribute__((aligned(8)));
221 typedef uint64_t cl_ulong
__attribute__((aligned(8)));
223 typedef uint16_t cl_half
__attribute__((aligned(2)));
224 typedef float cl_float
__attribute__((aligned(4)));
225 typedef double cl_double
__attribute__((aligned(8)));
227 /* Macro names and corresponding values defined by OpenCL */
228 #define CL_CHAR_BIT 8
229 #define CL_SCHAR_MAX 127
230 #define CL_SCHAR_MIN (-127-1)
231 #define CL_CHAR_MAX CL_SCHAR_MAX
232 #define CL_CHAR_MIN CL_SCHAR_MIN
233 #define CL_UCHAR_MAX 255
234 #define CL_SHRT_MAX 32767
235 #define CL_SHRT_MIN (-32767-1)
236 #define CL_USHRT_MAX 65535
237 #define CL_INT_MAX 2147483647
238 #define CL_INT_MIN (-2147483647-1)
239 #define CL_UINT_MAX 0xffffffffU
240 #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
241 #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
242 #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
245 #define CL_FLT_MANT_DIG 24
246 #define CL_FLT_MAX_10_EXP +38
247 #define CL_FLT_MAX_EXP +128
248 #define CL_FLT_MIN_10_EXP -37
249 #define CL_FLT_MIN_EXP -125
250 #define CL_FLT_RADIX 2
251 #define CL_FLT_MAX 0x1.fffffep127f
252 #define CL_FLT_MIN 0x1.0p-126f
253 #define CL_FLT_EPSILON 0x1.0p-23f
255 #define CL_DBL_DIG 15
256 #define CL_DBL_MANT_DIG 53
257 #define CL_DBL_MAX_10_EXP +308
258 #define CL_DBL_MAX_EXP +1024
259 #define CL_DBL_MIN_10_EXP -307
260 #define CL_DBL_MIN_EXP -1021
261 #define CL_DBL_RADIX 2
262 #define CL_DBL_MAX 0x1.fffffffffffffp1023
263 #define CL_DBL_MIN 0x1.0p-1022
264 #define CL_DBL_EPSILON 0x1.0p-52
266 #define CL_M_E 2.718281828459045090796
267 #define CL_M_LOG2E 1.442695040888963387005
268 #define CL_M_LOG10E 0.434294481903251816668
269 #define CL_M_LN2 0.693147180559945286227
270 #define CL_M_LN10 2.302585092994045901094
271 #define CL_M_PI 3.141592653589793115998
272 #define CL_M_PI_2 1.570796326794896557999
273 #define CL_M_PI_4 0.785398163397448278999
274 #define CL_M_1_PI 0.318309886183790691216
275 #define CL_M_2_PI 0.636619772367581382433
276 #define CL_M_2_SQRTPI 1.128379167095512558561
277 #define CL_M_SQRT2 1.414213562373095145475
278 #define CL_M_SQRT1_2 0.707106781186547572737
280 #define CL_M_E_F 2.71828174591064f
281 #define CL_M_LOG2E_F 1.44269502162933f
282 #define CL_M_LOG10E_F 0.43429449200630f
283 #define CL_M_LN2_F 0.69314718246460f
284 #define CL_M_LN10_F 2.30258512496948f
285 #define CL_M_PI_F 3.14159274101257f
286 #define CL_M_PI_2_F 1.57079637050629f
287 #define CL_M_PI_4_F 0.78539818525314f
288 #define CL_M_1_PI_F 0.31830987334251f
289 #define CL_M_2_PI_F 0.63661974668503f
290 #define CL_M_2_SQRTPI_F 1.12837922573090f
291 #define CL_M_SQRT2_F 1.41421353816986f
292 #define CL_M_SQRT1_2_F 0.70710676908493f
294 #if defined( __GNUC__ )
295 #define CL_HUGE_VALF __builtin_huge_valf()
296 #define CL_HUGE_VAL __builtin_huge_val()
297 #define CL_NAN __builtin_nanf( "" )
299 #define CL_HUGE_VALF ((cl_float) 1e50)
300 #define CL_HUGE_VAL ((cl_double) 1e500)
301 float nanf( const char * );
302 #define CL_NAN nanf( "" )
304 #define CL_MAXFLOAT CL_FLT_MAX
305 #define CL_INFINITY CL_HUGE_VALF
311 /* 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. */
312 typedef unsigned int cl_GLuint
;
313 typedef int cl_GLint
;
314 typedef unsigned int cl_GLenum
;
319 * Note: OpenCL requires that all types be naturally aligned.
320 * This means that vector types must be naturally aligned.
321 * For example, a vector of four floats must be aligned to
322 * a 16 byte boundary (calculated as 4 * the natural 4-byte
323 * alignment of the float). The alignment qualifiers here
324 * will only function properly if your compiler supports them
325 * and if you don't actively work to defeat them. For example,
326 * in order for a cl_float4 to be 16 byte aligned in a struct,
327 * the start of the struct must itself be 16-byte aligned.
329 * Maintaining proper alignment is the user's responsibility.
332 /* Define basic vector types */
333 #if defined( __VEC__ )
334 #include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
335 typedef vector
unsigned char __cl_uchar16
;
336 typedef vector
signed char __cl_char16
;
337 typedef vector
unsigned short __cl_ushort8
;
338 typedef vector
signed short __cl_short8
;
339 typedef vector
unsigned int __cl_uint4
;
340 typedef vector
signed int __cl_int4
;
341 typedef vector
float __cl_float4
;
342 #define __CL_UCHAR16__ 1
343 #define __CL_CHAR16__ 1
344 #define __CL_USHORT8__ 1
345 #define __CL_SHORT8__ 1
346 #define __CL_UINT4__ 1
347 #define __CL_INT4__ 1
348 #define __CL_FLOAT4__ 1
351 #if defined( __SSE__ )
352 #if defined( __MINGW64__ )
355 #include <xmmintrin.h>
357 #if defined( __GNUC__ )
358 typedef float __cl_float4
__attribute__((vector_size(16)));
360 typedef __m128 __cl_float4
;
362 #define __CL_FLOAT4__ 1
365 #if defined( __SSE2__ )
366 #if defined( __MINGW64__ )
369 #include <emmintrin.h>
371 #if defined( __GNUC__ )
372 typedef cl_uchar __cl_uchar16
__attribute__((vector_size(16)));
373 typedef cl_char __cl_char16
__attribute__((vector_size(16)));
374 typedef cl_ushort __cl_ushort8
__attribute__((vector_size(16)));
375 typedef cl_short __cl_short8
__attribute__((vector_size(16)));
376 typedef cl_uint __cl_uint4
__attribute__((vector_size(16)));
377 typedef cl_int __cl_int4
__attribute__((vector_size(16)));
378 typedef cl_ulong __cl_ulong2
__attribute__((vector_size(16)));
379 typedef cl_long __cl_long2
__attribute__((vector_size(16)));
380 typedef cl_double __cl_double2
__attribute__((vector_size(16)));
382 typedef __m128i __cl_uchar16
;
383 typedef __m128i __cl_char16
;
384 typedef __m128i __cl_ushort8
;
385 typedef __m128i __cl_short8
;
386 typedef __m128i __cl_uint4
;
387 typedef __m128i __cl_int4
;
388 typedef __m128i __cl_ulong2
;
389 typedef __m128i __cl_long2
;
390 typedef __m128d __cl_double2
;
392 #define __CL_UCHAR16__ 1
393 #define __CL_CHAR16__ 1
394 #define __CL_USHORT8__ 1
395 #define __CL_SHORT8__ 1
396 #define __CL_INT4__ 1
397 #define __CL_UINT4__ 1
398 #define __CL_ULONG2__ 1
399 #define __CL_LONG2__ 1
400 #define __CL_DOUBLE2__ 1
403 #if defined( __MMX__ )
404 #include <mmintrin.h>
405 #if defined( __GNUC__ )
406 typedef cl_uchar __cl_uchar8
__attribute__((vector_size(8)));
407 typedef cl_char __cl_char8
__attribute__((vector_size(8)));
408 typedef cl_ushort __cl_ushort4
__attribute__((vector_size(8)));
409 typedef cl_short __cl_short4
__attribute__((vector_size(8)));
410 typedef cl_uint __cl_uint2
__attribute__((vector_size(8)));
411 typedef cl_int __cl_int2
__attribute__((vector_size(8)));
412 typedef cl_ulong __cl_ulong1
__attribute__((vector_size(8)));
413 typedef cl_long __cl_long1
__attribute__((vector_size(8)));
414 typedef cl_float __cl_float2
__attribute__((vector_size(8)));
416 typedef __m64 __cl_uchar8
;
417 typedef __m64 __cl_char8
;
418 typedef __m64 __cl_ushort4
;
419 typedef __m64 __cl_short4
;
420 typedef __m64 __cl_uint2
;
421 typedef __m64 __cl_int2
;
422 typedef __m64 __cl_ulong1
;
423 typedef __m64 __cl_long1
;
424 typedef __m64 __cl_float2
;
426 #define __CL_UCHAR8__ 1
427 #define __CL_CHAR8__ 1
428 #define __CL_USHORT4__ 1
429 #define __CL_SHORT4__ 1
430 #define __CL_INT2__ 1
431 #define __CL_UINT2__ 1
432 #define __CL_ULONG1__ 1
433 #define __CL_LONG1__ 1
434 #define __CL_FLOAT2__ 1
437 #if defined( __AVX__ )
438 #if defined( __MINGW64__ )
441 #include <immintrin.h>
443 #if defined( __GNUC__ )
444 typedef cl_float __cl_float8
__attribute__((vector_size(32)));
445 typedef cl_double __cl_double4
__attribute__((vector_size(32)));
447 typedef __m256 __cl_float8
;
448 typedef __m256d __cl_double4
;
450 #define __CL_FLOAT8__ 1
451 #define __CL_DOUBLE4__ 1
454 /* Define capabilities for anonymous struct members. */
455 #if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
456 #define __CL_HAS_ANON_STRUCT__ 1
457 #define __CL_ANON_STRUCT__ __extension__
458 #elif defined( _WIN32) && (_MSC_VER >= 1500)
459 /* Microsoft Developer Studio 2008 supports anonymous structs, but
460 * complains by default. */
461 #define __CL_HAS_ANON_STRUCT__ 1
462 #define __CL_ANON_STRUCT__
463 /* Disable warning C4201: nonstandard extension used : nameless
465 #pragma warning( push )
466 #pragma warning( disable : 4201 )
468 #define __CL_HAS_ANON_STRUCT__ 0
469 #define __CL_ANON_STRUCT__
472 /* Define alignment keys */
473 #if defined( __GNUC__ )
474 #define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
475 #elif defined( _WIN32) && (_MSC_VER)
476 /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
477 /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */
478 /* #include <crtdefs.h> */
479 /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */
480 #define CL_ALIGNED(_x)
482 #warning Need to implement some method to align data here
483 #define CL_ALIGNED(_x)
486 /* Indicate whether .xyzw, .s0123 and .hi.lo are supported */
487 #if __CL_HAS_ANON_STRUCT__
488 /* .xyzw and .s0123...{f|F} are supported */
489 #define CL_HAS_NAMED_VECTOR_FIELDS 1
490 /* .hi and .lo are supported */
491 #define CL_HAS_HI_LO_VECTOR_FIELDS 1
494 /* Define cl_vector types */
496 /* ---- cl_charn ---- */
499 cl_char
CL_ALIGNED(2) s
[2];
500 #if __CL_HAS_ANON_STRUCT__
501 __CL_ANON_STRUCT__
struct{ cl_char x
, y
; };
502 __CL_ANON_STRUCT__
struct{ cl_char s0
, s1
; };
503 __CL_ANON_STRUCT__
struct{ cl_char lo
, hi
; };
505 #if defined( __CL_CHAR2__)
512 cl_char
CL_ALIGNED(4) s
[4];
513 #if __CL_HAS_ANON_STRUCT__
514 __CL_ANON_STRUCT__
struct{ cl_char x
, y
, z
, w
; };
515 __CL_ANON_STRUCT__
struct{ cl_char s0
, s1
, s2
, s3
; };
516 __CL_ANON_STRUCT__
struct{ cl_char2 lo
, hi
; };
518 #if defined( __CL_CHAR2__)
521 #if defined( __CL_CHAR4__)
526 /* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */
527 typedef cl_char4 cl_char3
;
531 cl_char
CL_ALIGNED(8) s
[8];
532 #if __CL_HAS_ANON_STRUCT__
533 __CL_ANON_STRUCT__
struct{ cl_char x
, y
, z
, w
; };
534 __CL_ANON_STRUCT__
struct{ cl_char s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
535 __CL_ANON_STRUCT__
struct{ cl_char4 lo
, hi
; };
537 #if defined( __CL_CHAR2__)
540 #if defined( __CL_CHAR4__)
543 #if defined( __CL_CHAR8__ )
550 cl_char
CL_ALIGNED(16) s
[16];
551 #if __CL_HAS_ANON_STRUCT__
552 __CL_ANON_STRUCT__
struct{ cl_char x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
553 __CL_ANON_STRUCT__
struct{ cl_char s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
554 __CL_ANON_STRUCT__
struct{ cl_char8 lo
, hi
; };
556 #if defined( __CL_CHAR2__)
559 #if defined( __CL_CHAR4__)
562 #if defined( __CL_CHAR8__ )
565 #if defined( __CL_CHAR16__ )
571 /* ---- cl_ucharn ---- */
574 cl_uchar
CL_ALIGNED(2) s
[2];
575 #if __CL_HAS_ANON_STRUCT__
576 __CL_ANON_STRUCT__
struct{ cl_uchar x
, y
; };
577 __CL_ANON_STRUCT__
struct{ cl_uchar s0
, s1
; };
578 __CL_ANON_STRUCT__
struct{ cl_uchar lo
, hi
; };
580 #if defined( __cl_uchar2__)
587 cl_uchar
CL_ALIGNED(4) s
[4];
588 #if __CL_HAS_ANON_STRUCT__
589 __CL_ANON_STRUCT__
struct{ cl_uchar x
, y
, z
, w
; };
590 __CL_ANON_STRUCT__
struct{ cl_uchar s0
, s1
, s2
, s3
; };
591 __CL_ANON_STRUCT__
struct{ cl_uchar2 lo
, hi
; };
593 #if defined( __CL_UCHAR2__)
596 #if defined( __CL_UCHAR4__)
601 /* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */
602 typedef cl_uchar4 cl_uchar3
;
606 cl_uchar
CL_ALIGNED(8) s
[8];
607 #if __CL_HAS_ANON_STRUCT__
608 __CL_ANON_STRUCT__
struct{ cl_uchar x
, y
, z
, w
; };
609 __CL_ANON_STRUCT__
struct{ cl_uchar s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
610 __CL_ANON_STRUCT__
struct{ cl_uchar4 lo
, hi
; };
612 #if defined( __CL_UCHAR2__)
615 #if defined( __CL_UCHAR4__)
618 #if defined( __CL_UCHAR8__ )
625 cl_uchar
CL_ALIGNED(16) s
[16];
626 #if __CL_HAS_ANON_STRUCT__
627 __CL_ANON_STRUCT__
struct{ cl_uchar x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
628 __CL_ANON_STRUCT__
struct{ cl_uchar s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
629 __CL_ANON_STRUCT__
struct{ cl_uchar8 lo
, hi
; };
631 #if defined( __CL_UCHAR2__)
634 #if defined( __CL_UCHAR4__)
637 #if defined( __CL_UCHAR8__ )
640 #if defined( __CL_UCHAR16__ )
646 /* ---- cl_shortn ---- */
649 cl_short
CL_ALIGNED(4) s
[2];
650 #if __CL_HAS_ANON_STRUCT__
651 __CL_ANON_STRUCT__
struct{ cl_short x
, y
; };
652 __CL_ANON_STRUCT__
struct{ cl_short s0
, s1
; };
653 __CL_ANON_STRUCT__
struct{ cl_short lo
, hi
; };
655 #if defined( __CL_SHORT2__)
662 cl_short
CL_ALIGNED(8) s
[4];
663 #if __CL_HAS_ANON_STRUCT__
664 __CL_ANON_STRUCT__
struct{ cl_short x
, y
, z
, w
; };
665 __CL_ANON_STRUCT__
struct{ cl_short s0
, s1
, s2
, s3
; };
666 __CL_ANON_STRUCT__
struct{ cl_short2 lo
, hi
; };
668 #if defined( __CL_SHORT2__)
671 #if defined( __CL_SHORT4__)
676 /* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */
677 typedef cl_short4 cl_short3
;
681 cl_short
CL_ALIGNED(16) s
[8];
682 #if __CL_HAS_ANON_STRUCT__
683 __CL_ANON_STRUCT__
struct{ cl_short x
, y
, z
, w
; };
684 __CL_ANON_STRUCT__
struct{ cl_short s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
685 __CL_ANON_STRUCT__
struct{ cl_short4 lo
, hi
; };
687 #if defined( __CL_SHORT2__)
690 #if defined( __CL_SHORT4__)
693 #if defined( __CL_SHORT8__ )
700 cl_short
CL_ALIGNED(32) s
[16];
701 #if __CL_HAS_ANON_STRUCT__
702 __CL_ANON_STRUCT__
struct{ cl_short x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
703 __CL_ANON_STRUCT__
struct{ cl_short s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
704 __CL_ANON_STRUCT__
struct{ cl_short8 lo
, hi
; };
706 #if defined( __CL_SHORT2__)
709 #if defined( __CL_SHORT4__)
712 #if defined( __CL_SHORT8__ )
715 #if defined( __CL_SHORT16__ )
721 /* ---- cl_ushortn ---- */
724 cl_ushort
CL_ALIGNED(4) s
[2];
725 #if __CL_HAS_ANON_STRUCT__
726 __CL_ANON_STRUCT__
struct{ cl_ushort x
, y
; };
727 __CL_ANON_STRUCT__
struct{ cl_ushort s0
, s1
; };
728 __CL_ANON_STRUCT__
struct{ cl_ushort lo
, hi
; };
730 #if defined( __CL_USHORT2__)
737 cl_ushort
CL_ALIGNED(8) s
[4];
738 #if __CL_HAS_ANON_STRUCT__
739 __CL_ANON_STRUCT__
struct{ cl_ushort x
, y
, z
, w
; };
740 __CL_ANON_STRUCT__
struct{ cl_ushort s0
, s1
, s2
, s3
; };
741 __CL_ANON_STRUCT__
struct{ cl_ushort2 lo
, hi
; };
743 #if defined( __CL_USHORT2__)
746 #if defined( __CL_USHORT4__)
751 /* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */
752 typedef cl_ushort4 cl_ushort3
;
756 cl_ushort
CL_ALIGNED(16) s
[8];
757 #if __CL_HAS_ANON_STRUCT__
758 __CL_ANON_STRUCT__
struct{ cl_ushort x
, y
, z
, w
; };
759 __CL_ANON_STRUCT__
struct{ cl_ushort s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
760 __CL_ANON_STRUCT__
struct{ cl_ushort4 lo
, hi
; };
762 #if defined( __CL_USHORT2__)
765 #if defined( __CL_USHORT4__)
768 #if defined( __CL_USHORT8__ )
775 cl_ushort
CL_ALIGNED(32) s
[16];
776 #if __CL_HAS_ANON_STRUCT__
777 __CL_ANON_STRUCT__
struct{ cl_ushort x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
778 __CL_ANON_STRUCT__
struct{ cl_ushort s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
779 __CL_ANON_STRUCT__
struct{ cl_ushort8 lo
, hi
; };
781 #if defined( __CL_USHORT2__)
784 #if defined( __CL_USHORT4__)
787 #if defined( __CL_USHORT8__ )
790 #if defined( __CL_USHORT16__ )
795 /* ---- cl_intn ---- */
798 cl_int
CL_ALIGNED(8) s
[2];
799 #if __CL_HAS_ANON_STRUCT__
800 __CL_ANON_STRUCT__
struct{ cl_int x
, y
; };
801 __CL_ANON_STRUCT__
struct{ cl_int s0
, s1
; };
802 __CL_ANON_STRUCT__
struct{ cl_int lo
, hi
; };
804 #if defined( __CL_INT2__)
811 cl_int
CL_ALIGNED(16) s
[4];
812 #if __CL_HAS_ANON_STRUCT__
813 __CL_ANON_STRUCT__
struct{ cl_int x
, y
, z
, w
; };
814 __CL_ANON_STRUCT__
struct{ cl_int s0
, s1
, s2
, s3
; };
815 __CL_ANON_STRUCT__
struct{ cl_int2 lo
, hi
; };
817 #if defined( __CL_INT2__)
820 #if defined( __CL_INT4__)
825 /* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */
826 typedef cl_int4 cl_int3
;
830 cl_int
CL_ALIGNED(32) s
[8];
831 #if __CL_HAS_ANON_STRUCT__
832 __CL_ANON_STRUCT__
struct{ cl_int x
, y
, z
, w
; };
833 __CL_ANON_STRUCT__
struct{ cl_int s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
834 __CL_ANON_STRUCT__
struct{ cl_int4 lo
, hi
; };
836 #if defined( __CL_INT2__)
839 #if defined( __CL_INT4__)
842 #if defined( __CL_INT8__ )
849 cl_int
CL_ALIGNED(64) s
[16];
850 #if __CL_HAS_ANON_STRUCT__
851 __CL_ANON_STRUCT__
struct{ cl_int x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
852 __CL_ANON_STRUCT__
struct{ cl_int s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
853 __CL_ANON_STRUCT__
struct{ cl_int8 lo
, hi
; };
855 #if defined( __CL_INT2__)
858 #if defined( __CL_INT4__)
861 #if defined( __CL_INT8__ )
864 #if defined( __CL_INT16__ )
870 /* ---- cl_uintn ---- */
873 cl_uint
CL_ALIGNED(8) s
[2];
874 #if __CL_HAS_ANON_STRUCT__
875 __CL_ANON_STRUCT__
struct{ cl_uint x
, y
; };
876 __CL_ANON_STRUCT__
struct{ cl_uint s0
, s1
; };
877 __CL_ANON_STRUCT__
struct{ cl_uint lo
, hi
; };
879 #if defined( __CL_UINT2__)
886 cl_uint
CL_ALIGNED(16) s
[4];
887 #if __CL_HAS_ANON_STRUCT__
888 __CL_ANON_STRUCT__
struct{ cl_uint x
, y
, z
, w
; };
889 __CL_ANON_STRUCT__
struct{ cl_uint s0
, s1
, s2
, s3
; };
890 __CL_ANON_STRUCT__
struct{ cl_uint2 lo
, hi
; };
892 #if defined( __CL_UINT2__)
895 #if defined( __CL_UINT4__)
900 /* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */
901 typedef cl_uint4 cl_uint3
;
905 cl_uint
CL_ALIGNED(32) s
[8];
906 #if __CL_HAS_ANON_STRUCT__
907 __CL_ANON_STRUCT__
struct{ cl_uint x
, y
, z
, w
; };
908 __CL_ANON_STRUCT__
struct{ cl_uint s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
909 __CL_ANON_STRUCT__
struct{ cl_uint4 lo
, hi
; };
911 #if defined( __CL_UINT2__)
914 #if defined( __CL_UINT4__)
917 #if defined( __CL_UINT8__ )
924 cl_uint
CL_ALIGNED(64) s
[16];
925 #if __CL_HAS_ANON_STRUCT__
926 __CL_ANON_STRUCT__
struct{ cl_uint x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
927 __CL_ANON_STRUCT__
struct{ cl_uint s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
928 __CL_ANON_STRUCT__
struct{ cl_uint8 lo
, hi
; };
930 #if defined( __CL_UINT2__)
933 #if defined( __CL_UINT4__)
936 #if defined( __CL_UINT8__ )
939 #if defined( __CL_UINT16__ )
944 /* ---- cl_longn ---- */
947 cl_long
CL_ALIGNED(16) s
[2];
948 #if __CL_HAS_ANON_STRUCT__
949 __CL_ANON_STRUCT__
struct{ cl_long x
, y
; };
950 __CL_ANON_STRUCT__
struct{ cl_long s0
, s1
; };
951 __CL_ANON_STRUCT__
struct{ cl_long lo
, hi
; };
953 #if defined( __CL_LONG2__)
960 cl_long
CL_ALIGNED(32) s
[4];
961 #if __CL_HAS_ANON_STRUCT__
962 __CL_ANON_STRUCT__
struct{ cl_long x
, y
, z
, w
; };
963 __CL_ANON_STRUCT__
struct{ cl_long s0
, s1
, s2
, s3
; };
964 __CL_ANON_STRUCT__
struct{ cl_long2 lo
, hi
; };
966 #if defined( __CL_LONG2__)
969 #if defined( __CL_LONG4__)
974 /* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */
975 typedef cl_long4 cl_long3
;
979 cl_long
CL_ALIGNED(64) s
[8];
980 #if __CL_HAS_ANON_STRUCT__
981 __CL_ANON_STRUCT__
struct{ cl_long x
, y
, z
, w
; };
982 __CL_ANON_STRUCT__
struct{ cl_long s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
983 __CL_ANON_STRUCT__
struct{ cl_long4 lo
, hi
; };
985 #if defined( __CL_LONG2__)
988 #if defined( __CL_LONG4__)
991 #if defined( __CL_LONG8__ )
998 cl_long
CL_ALIGNED(128) s
[16];
999 #if __CL_HAS_ANON_STRUCT__
1000 __CL_ANON_STRUCT__
struct{ cl_long x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
1001 __CL_ANON_STRUCT__
struct{ cl_long s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
1002 __CL_ANON_STRUCT__
struct{ cl_long8 lo
, hi
; };
1004 #if defined( __CL_LONG2__)
1007 #if defined( __CL_LONG4__)
1010 #if defined( __CL_LONG8__ )
1013 #if defined( __CL_LONG16__ )
1019 /* ---- cl_ulongn ---- */
1022 cl_ulong
CL_ALIGNED(16) s
[2];
1023 #if __CL_HAS_ANON_STRUCT__
1024 __CL_ANON_STRUCT__
struct{ cl_ulong x
, y
; };
1025 __CL_ANON_STRUCT__
struct{ cl_ulong s0
, s1
; };
1026 __CL_ANON_STRUCT__
struct{ cl_ulong lo
, hi
; };
1028 #if defined( __CL_ULONG2__)
1035 cl_ulong
CL_ALIGNED(32) s
[4];
1036 #if __CL_HAS_ANON_STRUCT__
1037 __CL_ANON_STRUCT__
struct{ cl_ulong x
, y
, z
, w
; };
1038 __CL_ANON_STRUCT__
struct{ cl_ulong s0
, s1
, s2
, s3
; };
1039 __CL_ANON_STRUCT__
struct{ cl_ulong2 lo
, hi
; };
1041 #if defined( __CL_ULONG2__)
1044 #if defined( __CL_ULONG4__)
1049 /* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */
1050 typedef cl_ulong4 cl_ulong3
;
1054 cl_ulong
CL_ALIGNED(64) s
[8];
1055 #if __CL_HAS_ANON_STRUCT__
1056 __CL_ANON_STRUCT__
struct{ cl_ulong x
, y
, z
, w
; };
1057 __CL_ANON_STRUCT__
struct{ cl_ulong s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
1058 __CL_ANON_STRUCT__
struct{ cl_ulong4 lo
, hi
; };
1060 #if defined( __CL_ULONG2__)
1063 #if defined( __CL_ULONG4__)
1066 #if defined( __CL_ULONG8__ )
1073 cl_ulong
CL_ALIGNED(128) s
[16];
1074 #if __CL_HAS_ANON_STRUCT__
1075 __CL_ANON_STRUCT__
struct{ cl_ulong x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
1076 __CL_ANON_STRUCT__
struct{ cl_ulong s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
1077 __CL_ANON_STRUCT__
struct{ cl_ulong8 lo
, hi
; };
1079 #if defined( __CL_ULONG2__)
1082 #if defined( __CL_ULONG4__)
1085 #if defined( __CL_ULONG8__ )
1088 #if defined( __CL_ULONG16__ )
1094 /* --- cl_floatn ---- */
1098 cl_float
CL_ALIGNED(8) s
[2];
1099 #if __CL_HAS_ANON_STRUCT__
1100 __CL_ANON_STRUCT__
struct{ cl_float x
, y
; };
1101 __CL_ANON_STRUCT__
struct{ cl_float s0
, s1
; };
1102 __CL_ANON_STRUCT__
struct{ cl_float lo
, hi
; };
1104 #if defined( __CL_FLOAT2__)
1111 cl_float
CL_ALIGNED(16) s
[4];
1112 #if __CL_HAS_ANON_STRUCT__
1113 __CL_ANON_STRUCT__
struct{ cl_float x
, y
, z
, w
; };
1114 __CL_ANON_STRUCT__
struct{ cl_float s0
, s1
, s2
, s3
; };
1115 __CL_ANON_STRUCT__
struct{ cl_float2 lo
, hi
; };
1117 #if defined( __CL_FLOAT2__)
1120 #if defined( __CL_FLOAT4__)
1125 /* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */
1126 typedef cl_float4 cl_float3
;
1130 cl_float
CL_ALIGNED(32) s
[8];
1131 #if __CL_HAS_ANON_STRUCT__
1132 __CL_ANON_STRUCT__
struct{ cl_float x
, y
, z
, w
; };
1133 __CL_ANON_STRUCT__
struct{ cl_float s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
1134 __CL_ANON_STRUCT__
struct{ cl_float4 lo
, hi
; };
1136 #if defined( __CL_FLOAT2__)
1139 #if defined( __CL_FLOAT4__)
1142 #if defined( __CL_FLOAT8__ )
1149 cl_float
CL_ALIGNED(64) s
[16];
1150 #if __CL_HAS_ANON_STRUCT__
1151 __CL_ANON_STRUCT__
struct{ cl_float x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
1152 __CL_ANON_STRUCT__
struct{ cl_float s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
1153 __CL_ANON_STRUCT__
struct{ cl_float8 lo
, hi
; };
1155 #if defined( __CL_FLOAT2__)
1158 #if defined( __CL_FLOAT4__)
1161 #if defined( __CL_FLOAT8__ )
1164 #if defined( __CL_FLOAT16__ )
1169 /* --- cl_doublen ---- */
1173 cl_double
CL_ALIGNED(16) s
[2];
1174 #if __CL_HAS_ANON_STRUCT__
1175 __CL_ANON_STRUCT__
struct{ cl_double x
, y
; };
1176 __CL_ANON_STRUCT__
struct{ cl_double s0
, s1
; };
1177 __CL_ANON_STRUCT__
struct{ cl_double lo
, hi
; };
1179 #if defined( __CL_DOUBLE2__)
1186 cl_double
CL_ALIGNED(32) s
[4];
1187 #if __CL_HAS_ANON_STRUCT__
1188 __CL_ANON_STRUCT__
struct{ cl_double x
, y
, z
, w
; };
1189 __CL_ANON_STRUCT__
struct{ cl_double s0
, s1
, s2
, s3
; };
1190 __CL_ANON_STRUCT__
struct{ cl_double2 lo
, hi
; };
1192 #if defined( __CL_DOUBLE2__)
1195 #if defined( __CL_DOUBLE4__)
1200 /* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */
1201 typedef cl_double4 cl_double3
;
1205 cl_double
CL_ALIGNED(64) s
[8];
1206 #if __CL_HAS_ANON_STRUCT__
1207 __CL_ANON_STRUCT__
struct{ cl_double x
, y
, z
, w
; };
1208 __CL_ANON_STRUCT__
struct{ cl_double s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
; };
1209 __CL_ANON_STRUCT__
struct{ cl_double4 lo
, hi
; };
1211 #if defined( __CL_DOUBLE2__)
1214 #if defined( __CL_DOUBLE4__)
1217 #if defined( __CL_DOUBLE8__ )
1224 cl_double
CL_ALIGNED(128) s
[16];
1225 #if __CL_HAS_ANON_STRUCT__
1226 __CL_ANON_STRUCT__
struct{ cl_double x
, y
, z
, w
, __spacer4
, __spacer5
, __spacer6
, __spacer7
, __spacer8
, __spacer9
, sa
, sb
, sc
, sd
, se
, sf
; };
1227 __CL_ANON_STRUCT__
struct{ cl_double s0
, s1
, s2
, s3
, s4
, s5
, s6
, s7
, s8
, s9
, sA
, sB
, sC
, sD
, sE
, sF
; };
1228 __CL_ANON_STRUCT__
struct{ cl_double8 lo
, hi
; };
1230 #if defined( __CL_DOUBLE2__)
1233 #if defined( __CL_DOUBLE4__)
1236 #if defined( __CL_DOUBLE8__ )
1239 #if defined( __CL_DOUBLE16__ )
1244 /* Macro to facilitate debugging
1246 * Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source.
1247 * The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \"
1248 * Each line thereafter of OpenCL C source must end with: \n\
1249 * The last line ends in ";
1253 * const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\
1254 * kernel void foo( int a, float * b ) \n\
1257 * *b[ get_global_id(0)] = a; \n\
1261 * This should correctly set up the line, (column) and file information for your source
1262 * string so you can do source level debugging.
1264 #define __CL_STRINGIFY( _x ) # _x
1265 #define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x )
1266 #define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n"
1272 #undef __CL_HAS_ANON_STRUCT__
1273 #undef __CL_ANON_STRUCT__
1274 #if defined( _WIN32) && (_MSC_VER >= 1500)
1275 #pragma warning( pop )
1278 #endif /* __CL_PLATFORM_H */