1
/**********************************************************************************
2
* Copyright (c) 2008-2009 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: 10327 $ on $Date: 2010-02-11 00:24:35 +0530 (Thu, 11 Feb 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
47
#define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
48
#define CL_API_SUFFIX__VERSION_1_1
49
#define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
51
#define CL_API_SUFFIX__VERSION_1_0
52
#define CL_API_SUFFIX__VERSION_1_1
53
#define CL_EXTENSION_WEAK_LINK
56
#if (defined (_WIN32) && defined(_MSC_VER))
59
typedef signed __int8 cl_char;
60
typedef unsigned __int8 cl_uchar;
61
typedef signed __int16 cl_short;
62
typedef unsigned __int16 cl_ushort;
63
typedef signed __int32 cl_int;
64
typedef unsigned __int32 cl_uint;
65
typedef signed __int64 cl_long;
66
typedef unsigned __int64 cl_ulong;
68
typedef unsigned __int16 cl_half;
69
typedef float cl_float;
70
typedef double cl_double;
72
/* Macro names and corresponding values defined by OpenCL */
74
#define CL_SCHAR_MAX 127
75
#define CL_SCHAR_MIN (-127-1)
76
#define CL_CHAR_MAX CL_SCHAR_MAX
77
#define CL_CHAR_MIN CL_SCHAR_MIN
78
#define CL_UCHAR_MAX 255
79
#define CL_SHRT_MAX 32767
80
#define CL_SHRT_MIN (-32767-1)
81
#define CL_USHRT_MAX 65535
82
#define CL_INT_MAX 2147483647
83
#define CL_INT_MIN (-2147483647-1)
84
#define CL_UINT_MAX 0xffffffffU
85
#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
86
#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
87
#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
90
#define CL_FLT_MANT_DIG 24
91
#define CL_FLT_MAX_10_EXP +38
92
#define CL_FLT_MAX_EXP +128
93
#define CL_FLT_MIN_10_EXP -37
94
#define CL_FLT_MIN_EXP -125
95
#define CL_FLT_RADIX 2
96
#define CL_FLT_MAX 340282346638528859811704183484516925440.0f
97
#define CL_FLT_MIN 1.175494350822287507969e-38f
98
#define CL_FLT_EPSILON 0x1.0p-23f
100
#define CL_DBL_DIG 15
101
#define CL_DBL_MANT_DIG 53
102
#define CL_DBL_MAX_10_EXP +308
103
#define CL_DBL_MAX_EXP +1024
104
#define CL_DBL_MIN_10_EXP -307
105
#define CL_DBL_MIN_EXP -1021
106
#define CL_DBL_RADIX 2
107
#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
108
#define CL_DBL_MIN 2.225073858507201383090e-308
109
#define CL_DBL_EPSILON 2.220446049250313080847e-16
111
#define CL_NAN (CL_INFINITY - CL_INFINITY)
112
#define CL_HUGE_VALF ((cl_float) 1e50)
113
#define CL_HUGE_VAL ((cl_double) 1e500)
114
#define CL_MAXFLOAT CL_FLT_MAX
115
#define CL_INFINITY CL_HUGE_VALF
122
typedef int8_t cl_char;
123
typedef uint8_t cl_uchar;
124
typedef int16_t cl_short __attribute__((aligned(2)));
125
typedef uint16_t cl_ushort __attribute__((aligned(2)));
126
typedef int32_t cl_int __attribute__((aligned(4)));
127
typedef uint32_t cl_uint __attribute__((aligned(4)));
128
typedef int64_t cl_long __attribute__((aligned(8)));
129
typedef uint64_t cl_ulong __attribute__((aligned(8)));
131
typedef uint16_t cl_half __attribute__((aligned(2)));
132
typedef float cl_float __attribute__((aligned(4)));
133
typedef double cl_double __attribute__((aligned(8)));
135
/* Macro names and corresponding values defined by OpenCL */
136
#define CL_CHAR_BIT 8
137
#define CL_SCHAR_MAX 127
138
#define CL_SCHAR_MIN (-127-1)
139
#define CL_CHAR_MAX CL_SCHAR_MAX
140
#define CL_CHAR_MIN CL_SCHAR_MIN
141
#define CL_UCHAR_MAX 255
142
#define CL_SHRT_MAX 32767
143
#define CL_SHRT_MIN (-32767-1)
144
#define CL_USHRT_MAX 65535
145
#define CL_INT_MAX 2147483647
146
#define CL_INT_MIN (-2147483647-1)
147
#define CL_UINT_MAX 0xffffffffU
148
#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
149
#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
150
#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
153
#define CL_FLT_MANT_DIG 24
154
#define CL_FLT_MAX_10_EXP +38
155
#define CL_FLT_MAX_EXP +128
156
#define CL_FLT_MIN_10_EXP -37
157
#define CL_FLT_MIN_EXP -125
158
#define CL_FLT_RADIX 2
159
#define CL_FLT_MAX 0x1.fffffep127f
160
#define CL_FLT_MIN 0x1.0p-126f
161
#define CL_FLT_EPSILON 0x1.0p-23f
163
#define CL_DBL_DIG 15
164
#define CL_DBL_MANT_DIG 53
165
#define CL_DBL_MAX_10_EXP +308
166
#define CL_DBL_MAX_EXP +1024
167
#define CL_DBL_MIN_10_EXP -307
168
#define CL_DBL_MIN_EXP -1021
169
#define CL_DBL_RADIX 2
170
#define CL_DBL_MAX 0x1.fffffffffffffp1023
171
#define CL_DBL_MIN 0x1.0p-1022
172
#define CL_DBL_EPSILON 0x1.0p-52
174
#if defined( __GNUC__ )
175
#define CL_HUGE_VALF __builtin_huge_valf()
176
#define CL_HUGE_VAL __builtin_huge_val()
177
#define CL_NAN __builtin_nanf( "" )
179
#define CL_HUGE_VALF ((cl_float) 1e50)
180
#define CL_HUGE_VAL ((cl_double) 1e500)
181
float nanf( const char * );
182
#define CL_NAN nanf( "" )
184
#define CL_MAXFLOAT CL_FLT_MAX
185
#define CL_INFINITY CL_HUGE_VALF
191
/* Mirror types to GL types. Mirror types allow us to avoid deciding which headers to load based on whether we are using GL or GLES here. */
192
typedef unsigned int cl_GLuint;
193
typedef int cl_GLint;
194
typedef unsigned int cl_GLenum;
199
* Note: OpenCL requires that all types be naturally aligned.
200
* This means that vector types must be naturally aligned.
201
* For example, a vector of four floats must be aligned to
202
* a 16 byte boundary (calculated as 4 * the natural 4-byte
203
* alignment of the float). The alignment qualifiers here
204
* will only function properly if your compiler supports them
205
* and if you don't actively work to defeat them. For example,
206
* in order for a cl_float4 to be 16 byte aligned in a struct,
207
* the start of the struct must itself be 16-byte aligned.
209
* Maintaining proper alignment is the user's responsibility.
212
/* Define basic vector types */
213
#if defined( __VEC__ )
214
#include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
215
typedef vector unsigned char __cl_uchar16;
216
typedef vector signed char __cl_char16;
217
typedef vector unsigned short __cl_ushort8;
218
typedef vector signed short __cl_short8;
219
typedef vector unsigned int __cl_uint4;
220
typedef vector signed int __cl_int4;
221
typedef vector float __cl_float4;
222
#define __CL_UCHAR16__ 1
223
#define __CL_CHAR16__ 1
224
#define __CL_USHORT8__ 1
225
#define __CL_SHORT8__ 1
226
#define __CL_UINT4__ 1
227
#define __CL_INT4__ 1
228
#define __CL_FLOAT4__ 1
231
#if defined( __SSE__ )
232
#if defined( __MINGW64__ )
235
#include <xmmintrin.h>
237
#if defined( __GNUC__ )
238
typedef float __cl_float4 __attribute__((vector_size(16)));
240
typedef __m128 __cl_float4;
242
#define __CL_FLOAT4__ 1
245
#if defined( __SSE2__ )
246
#if defined( __MINGW64__ )
249
#include <emmintrin.h>
251
#if defined( __GNUC__ )
252
typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));
253
typedef cl_char __cl_char16 __attribute__((vector_size(16)));
254
typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));
255
typedef cl_short __cl_short8 __attribute__((vector_size(16)));
256
typedef cl_uint __cl_uint4 __attribute__((vector_size(16)));
257
typedef cl_int __cl_int4 __attribute__((vector_size(16)));
258
typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16)));
259
typedef cl_long __cl_long2 __attribute__((vector_size(16)));
260
typedef cl_double __cl_double2 __attribute__((vector_size(16)));
262
typedef __m128i __cl_uchar16;
263
typedef __m128i __cl_char16;
264
typedef __m128i __cl_ushort8;
265
typedef __m128i __cl_short8;
266
typedef __m128i __cl_uint4;
267
typedef __m128i __cl_int4;
268
typedef __m128i __cl_ulong2;
269
typedef __m128i __cl_long2;
270
typedef __m128d __cl_double2;
272
#define __CL_UCHAR16__ 1
273
#define __CL_CHAR16__ 1
274
#define __CL_USHORT8__ 1
275
#define __CL_SHORT8__ 1
276
#define __CL_INT4__ 1
277
#define __CL_UINT4__ 1
278
#define __CL_ULONG2__ 1
279
#define __CL_LONG2__ 1
280
#define __CL_DOUBLE2__ 1
283
#if defined( __MMX__ )
284
#include <mmintrin.h>
285
#if defined( __GNUC__ )
286
typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));
287
typedef cl_char __cl_char8 __attribute__((vector_size(8)));
288
typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));
289
typedef cl_short __cl_short4 __attribute__((vector_size(8)));
290
typedef cl_uint __cl_uint2 __attribute__((vector_size(8)));
291
typedef cl_int __cl_int2 __attribute__((vector_size(8)));
292
typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8)));
293
typedef cl_long __cl_long1 __attribute__((vector_size(8)));
294
typedef cl_float __cl_float2 __attribute__((vector_size(8)));
296
typedef __m64 __cl_uchar8;
297
typedef __m64 __cl_char8;
298
typedef __m64 __cl_ushort4;
299
typedef __m64 __cl_short4;
300
typedef __m64 __cl_uint2;
301
typedef __m64 __cl_int2;
302
typedef __m64 __cl_ulong1;
303
typedef __m64 __cl_long1;
304
typedef __m64 __cl_float2;
306
#define __CL_UCHAR8__ 1
307
#define __CL_CHAR8__ 1
308
#define __CL_USHORT4__ 1
309
#define __CL_SHORT4__ 1
310
#define __CL_INT2__ 1
311
#define __CL_UINT2__ 1
312
#define __CL_ULONG1__ 1
313
#define __CL_LONG1__ 1
314
#define __CL_FLOAT2__ 1
317
#if defined( __AVX__ )
318
#include <gmmintrin.h>
319
#if defined( __GNUC__ )
320
typedef cl_float __cl_float8 __attribute__((vector_size(32)));
321
typedef cl_double __cl_double4 __attribute__((vector_size(32)));
323
typedef __m256 __cl_float8;
324
typedef __m256d __cl_double4;
326
#define __CL_FLOAT8__ 1
327
#define __CL_DOUBLE4__ 1
330
/* Define alignment keys */
331
#if defined( __GNUC__ )
332
#define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
333
#elif defined( _WIN32) && (_MSC_VER)
334
/* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
335
/* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */
336
/* #include <crtdefs.h> */
337
/* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */
338
#define CL_ALIGNED(_x)
340
#warning Need to implement some method to align data here
341
#define CL_ALIGNED(_x)
344
/* Indicate whether .xyzw, .s0123 and .hi.lo are supported */
345
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
346
/* .xyzw and .s0123...{f|F} are supported */
347
#define CL_HAS_NAMED_VECTOR_FIELDS 1
348
/* .hi and .lo are supported */
349
#define CL_HAS_HI_LO_VECTOR_FIELDS 1
352
/* Define cl_vector types */
354
/* ---- cl_charn ---- */
357
cl_char CL_ALIGNED(2) s[2];
358
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
359
__extension__ struct{ cl_char x, y; };
360
__extension__ struct{ cl_char s0, s1; };
361
__extension__ struct{ cl_char lo, hi; };
363
#if defined( __CL_CHAR2__)
370
cl_char CL_ALIGNED(4) s[4];
371
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
372
__extension__ struct{ cl_char x, y, z, w; };
373
__extension__ struct{ cl_char s0, s1, s2, s3; };
374
__extension__ struct{ cl_char2 lo, hi; };
376
#if defined( __CL_CHAR2__)
379
#if defined( __CL_CHAR4__)
386
cl_char CL_ALIGNED(8) s[8];
387
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
388
__extension__ struct{ cl_char x, y, z, w; };
389
__extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; };
390
__extension__ struct{ cl_char4 lo, hi; };
392
#if defined( __CL_CHAR2__)
395
#if defined( __CL_CHAR4__)
398
#if defined( __CL_CHAR8__ )
405
cl_char CL_ALIGNED(16) s[16];
406
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
407
__extension__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
408
__extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
409
__extension__ struct{ cl_char8 lo, hi; };
411
#if defined( __CL_CHAR2__)
414
#if defined( __CL_CHAR4__)
417
#if defined( __CL_CHAR8__ )
420
#if defined( __CL_CHAR16__ )
426
/* ---- cl_ucharn ---- */
429
cl_uchar CL_ALIGNED(2) s[2];
430
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
431
__extension__ struct{ cl_uchar x, y; };
432
__extension__ struct{ cl_uchar s0, s1; };
433
__extension__ struct{ cl_uchar lo, hi; };
435
#if defined( __cl_uchar2__)
442
cl_uchar CL_ALIGNED(4) s[4];
443
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
444
__extension__ struct{ cl_uchar x, y, z, w; };
445
__extension__ struct{ cl_uchar s0, s1, s2, s3; };
446
__extension__ struct{ cl_uchar2 lo, hi; };
448
#if defined( __CL_UCHAR2__)
451
#if defined( __CL_UCHAR4__)
458
cl_uchar CL_ALIGNED(8) s[8];
459
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
460
__extension__ struct{ cl_uchar x, y, z, w; };
461
__extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; };
462
__extension__ struct{ cl_uchar4 lo, hi; };
464
#if defined( __CL_UCHAR2__)
467
#if defined( __CL_UCHAR4__)
470
#if defined( __CL_UCHAR8__ )
477
cl_uchar CL_ALIGNED(16) s[16];
478
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
479
__extension__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
480
__extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
481
__extension__ struct{ cl_uchar8 lo, hi; };
483
#if defined( __CL_UCHAR2__)
486
#if defined( __CL_UCHAR4__)
489
#if defined( __CL_UCHAR8__ )
492
#if defined( __CL_UCHAR16__ )
498
/* ---- cl_shortn ---- */
501
cl_short CL_ALIGNED(4) s[2];
502
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
503
__extension__ struct{ cl_short x, y; };
504
__extension__ struct{ cl_short s0, s1; };
505
__extension__ struct{ cl_short lo, hi; };
507
#if defined( __CL_SHORT2__)
514
cl_short CL_ALIGNED(8) s[4];
515
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
516
__extension__ struct{ cl_short x, y, z, w; };
517
__extension__ struct{ cl_short s0, s1, s2, s3; };
518
__extension__ struct{ cl_short2 lo, hi; };
520
#if defined( __CL_SHORT2__)
523
#if defined( __CL_SHORT4__)
530
cl_short CL_ALIGNED(16) s[8];
531
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
532
__extension__ struct{ cl_short x, y, z, w; };
533
__extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; };
534
__extension__ struct{ cl_short4 lo, hi; };
536
#if defined( __CL_SHORT2__)
539
#if defined( __CL_SHORT4__)
542
#if defined( __CL_SHORT8__ )
549
cl_short CL_ALIGNED(32) s[16];
550
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
551
__extension__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
552
__extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
553
__extension__ struct{ cl_short8 lo, hi; };
555
#if defined( __CL_SHORT2__)
558
#if defined( __CL_SHORT4__)
561
#if defined( __CL_SHORT8__ )
564
#if defined( __CL_SHORT16__ )
570
/* ---- cl_ushortn ---- */
573
cl_ushort CL_ALIGNED(4) s[2];
574
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
575
__extension__ struct{ cl_ushort x, y; };
576
__extension__ struct{ cl_ushort s0, s1; };
577
__extension__ struct{ cl_ushort lo, hi; };
579
#if defined( __CL_USHORT2__)
586
cl_ushort CL_ALIGNED(8) s[4];
587
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
588
__extension__ struct{ cl_ushort x, y, z, w; };
589
__extension__ struct{ cl_ushort s0, s1, s2, s3; };
590
__extension__ struct{ cl_ushort2 lo, hi; };
592
#if defined( __CL_USHORT2__)
595
#if defined( __CL_USHORT4__)
602
cl_ushort CL_ALIGNED(16) s[8];
603
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
604
__extension__ struct{ cl_ushort x, y, z, w; };
605
__extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; };
606
__extension__ struct{ cl_ushort4 lo, hi; };
608
#if defined( __CL_USHORT2__)
611
#if defined( __CL_USHORT4__)
614
#if defined( __CL_USHORT8__ )
621
cl_ushort CL_ALIGNED(32) s[16];
622
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
623
__extension__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
624
__extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
625
__extension__ struct{ cl_ushort8 lo, hi; };
627
#if defined( __CL_USHORT2__)
630
#if defined( __CL_USHORT4__)
633
#if defined( __CL_USHORT8__ )
636
#if defined( __CL_USHORT16__ )
641
/* ---- cl_intn ---- */
644
cl_int CL_ALIGNED(8) s[2];
645
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
646
__extension__ struct{ cl_int x, y; };
647
__extension__ struct{ cl_int s0, s1; };
648
__extension__ struct{ cl_int lo, hi; };
650
#if defined( __CL_INT2__)
657
cl_int CL_ALIGNED(16) s[4];
658
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
659
__extension__ struct{ cl_int x, y, z, w; };
660
__extension__ struct{ cl_int s0, s1, s2, s3; };
661
__extension__ struct{ cl_int2 lo, hi; };
663
#if defined( __CL_INT2__)
666
#if defined( __CL_INT4__)
673
cl_int CL_ALIGNED(32) s[8];
674
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
675
__extension__ struct{ cl_int x, y, z, w; };
676
__extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; };
677
__extension__ struct{ cl_int4 lo, hi; };
679
#if defined( __CL_INT2__)
682
#if defined( __CL_INT4__)
685
#if defined( __CL_INT8__ )
692
cl_int CL_ALIGNED(64) s[16];
693
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
694
__extension__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
695
__extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
696
__extension__ struct{ cl_int8 lo, hi; };
698
#if defined( __CL_INT2__)
701
#if defined( __CL_INT4__)
704
#if defined( __CL_INT8__ )
707
#if defined( __CL_INT16__ )
713
/* ---- cl_uintn ---- */
716
cl_uint CL_ALIGNED(8) s[2];
717
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
718
__extension__ struct{ cl_uint x, y; };
719
__extension__ struct{ cl_uint s0, s1; };
720
__extension__ struct{ cl_uint lo, hi; };
722
#if defined( __CL_UINT2__)
729
cl_uint CL_ALIGNED(16) s[4];
730
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
731
__extension__ struct{ cl_uint x, y, z, w; };
732
__extension__ struct{ cl_uint s0, s1, s2, s3; };
733
__extension__ struct{ cl_uint2 lo, hi; };
735
#if defined( __CL_UINT2__)
738
#if defined( __CL_UINT4__)
745
cl_uint CL_ALIGNED(32) s[8];
746
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
747
__extension__ struct{ cl_uint x, y, z, w; };
748
__extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; };
749
__extension__ struct{ cl_uint4 lo, hi; };
751
#if defined( __CL_UINT2__)
754
#if defined( __CL_UINT4__)
757
#if defined( __CL_UINT8__ )
764
cl_uint CL_ALIGNED(64) s[16];
765
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
766
__extension__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
767
__extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
768
__extension__ struct{ cl_uint8 lo, hi; };
770
#if defined( __CL_UINT2__)
773
#if defined( __CL_UINT4__)
776
#if defined( __CL_UINT8__ )
779
#if defined( __CL_UINT16__ )
784
/* ---- cl_longn ---- */
787
cl_long CL_ALIGNED(16) s[2];
788
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
789
__extension__ struct{ cl_long x, y; };
790
__extension__ struct{ cl_long s0, s1; };
791
__extension__ struct{ cl_long lo, hi; };
793
#if defined( __CL_LONG2__)
800
cl_long CL_ALIGNED(32) s[4];
801
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
802
__extension__ struct{ cl_long x, y, z, w; };
803
__extension__ struct{ cl_long s0, s1, s2, s3; };
804
__extension__ struct{ cl_long2 lo, hi; };
806
#if defined( __CL_LONG2__)
809
#if defined( __CL_LONG4__)
816
cl_long CL_ALIGNED(64) s[8];
817
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
818
__extension__ struct{ cl_long x, y, z, w; };
819
__extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; };
820
__extension__ struct{ cl_long4 lo, hi; };
822
#if defined( __CL_LONG2__)
825
#if defined( __CL_LONG4__)
828
#if defined( __CL_LONG8__ )
835
cl_long CL_ALIGNED(128) s[16];
836
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
837
__extension__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
838
__extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
839
__extension__ struct{ cl_long8 lo, hi; };
841
#if defined( __CL_LONG2__)
844
#if defined( __CL_LONG4__)
847
#if defined( __CL_LONG8__ )
850
#if defined( __CL_LONG16__ )
856
/* ---- cl_ulongn ---- */
859
cl_ulong CL_ALIGNED(16) s[2];
860
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
861
__extension__ struct{ cl_ulong x, y; };
862
__extension__ struct{ cl_ulong s0, s1; };
863
__extension__ struct{ cl_ulong lo, hi; };
865
#if defined( __CL_ULONG2__)
872
cl_ulong CL_ALIGNED(32) s[4];
873
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
874
__extension__ struct{ cl_ulong x, y, z, w; };
875
__extension__ struct{ cl_ulong s0, s1, s2, s3; };
876
__extension__ struct{ cl_ulong2 lo, hi; };
878
#if defined( __CL_ULONG2__)
881
#if defined( __CL_ULONG4__)
888
cl_ulong CL_ALIGNED(64) s[8];
889
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
890
__extension__ struct{ cl_ulong x, y, z, w; };
891
__extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; };
892
__extension__ struct{ cl_ulong4 lo, hi; };
894
#if defined( __CL_ULONG2__)
897
#if defined( __CL_ULONG4__)
900
#if defined( __CL_ULONG8__ )
907
cl_ulong CL_ALIGNED(128) s[16];
908
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
909
__extension__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
910
__extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
911
__extension__ struct{ cl_ulong8 lo, hi; };
913
#if defined( __CL_ULONG2__)
916
#if defined( __CL_ULONG4__)
919
#if defined( __CL_ULONG8__ )
922
#if defined( __CL_ULONG16__ )
928
/* --- cl_floatn ---- */
932
cl_float CL_ALIGNED(8) s[2];
933
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
934
__extension__ struct{ cl_float x, y; };
935
__extension__ struct{ cl_float s0, s1; };
936
__extension__ struct{ cl_float lo, hi; };
938
#if defined( __CL_FLOAT2__)
945
cl_float CL_ALIGNED(16) s[4];
946
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
947
__extension__ struct{ cl_float x, y, z, w; };
948
__extension__ struct{ cl_float s0, s1, s2, s3; };
949
__extension__ struct{ cl_float2 lo, hi; };
951
#if defined( __CL_FLOAT2__)
954
#if defined( __CL_FLOAT4__)
961
cl_float CL_ALIGNED(32) s[8];
962
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
963
__extension__ struct{ cl_float x, y, z, w; };
964
__extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; };
965
__extension__ struct{ cl_float4 lo, hi; };
967
#if defined( __CL_FLOAT2__)
970
#if defined( __CL_FLOAT4__)
973
#if defined( __CL_FLOAT8__ )
980
cl_float CL_ALIGNED(64) s[16];
981
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
982
__extension__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
983
__extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
984
__extension__ struct{ cl_float8 lo, hi; };
986
#if defined( __CL_FLOAT2__)
989
#if defined( __CL_FLOAT4__)
992
#if defined( __CL_FLOAT8__ )
995
#if defined( __CL_FLOAT16__ )
1000
/* --- cl_doublen ---- */
1004
cl_double CL_ALIGNED(16) s[2];
1005
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
1006
__extension__ struct{ cl_double x, y; };
1007
__extension__ struct{ cl_double s0, s1; };
1008
__extension__ struct{ cl_double lo, hi; };
1010
#if defined( __CL_DOUBLE2__)
1017
cl_double CL_ALIGNED(32) s[4];
1018
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
1019
__extension__ struct{ cl_double x, y, z, w; };
1020
__extension__ struct{ cl_double s0, s1, s2, s3; };
1021
__extension__ struct{ cl_double2 lo, hi; };
1023
#if defined( __CL_DOUBLE2__)
1026
#if defined( __CL_DOUBLE4__)
1033
cl_double CL_ALIGNED(64) s[8];
1034
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
1035
__extension__ struct{ cl_double x, y, z, w; };
1036
__extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; };
1037
__extension__ struct{ cl_double4 lo, hi; };
1039
#if defined( __CL_DOUBLE2__)
1042
#if defined( __CL_DOUBLE4__)
1045
#if defined( __CL_DOUBLE8__ )
1052
cl_double CL_ALIGNED(128) s[16];
1053
#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
1054
__extension__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1055
__extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1056
__extension__ struct{ cl_double8 lo, hi; };
1058
#if defined( __CL_DOUBLE2__)
1061
#if defined( __CL_DOUBLE4__)
1064
#if defined( __CL_DOUBLE8__ )
1067
#if defined( __CL_DOUBLE16__ )
1077
#endif /* __CL_PLATFORM_H */