baoabmd 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/BaoabMD.js +928 -0
  2. package/CL/cl.h +1979 -0
  3. package/CL/cl_d3d10.h +268 -0
  4. package/CL/cl_d3d11.h +270 -0
  5. package/CL/cl_dx9_media_sharing.h +386 -0
  6. package/CL/cl_dx9_media_sharing_intel.h +18 -0
  7. package/CL/cl_egl.h +187 -0
  8. package/CL/cl_ext.h +4738 -0
  9. package/CL/cl_ext_intel.h +19 -0
  10. package/CL/cl_function_types.h +1199 -0
  11. package/CL/cl_gl.h +421 -0
  12. package/CL/cl_gl_ext.h +18 -0
  13. package/CL/cl_half.h +440 -0
  14. package/CL/cl_icd.h +349 -0
  15. package/CL/cl_layer.h +163 -0
  16. package/CL/cl_platform.h +1414 -0
  17. package/CL/cl_va_api_media_sharing_intel.h +220 -0
  18. package/CL/cl_version.h +85 -0
  19. package/CL/opencl.h +32 -0
  20. package/INSTRUCTIONS.txt +13 -0
  21. package/OpenCL.lib +0 -0
  22. package/binding.gyp +24 -0
  23. package/build/Release/forces.exp +0 -0
  24. package/build/Release/forces.iobj +0 -0
  25. package/build/Release/forces.ipdb +0 -0
  26. package/build/Release/forces.lib +0 -0
  27. package/build/Release/forces.node +0 -0
  28. package/build/Release/forces.pdb +0 -0
  29. package/build/Release/nothing.lib +0 -0
  30. package/build/Release/obj/forces/forces.node.recipe +11 -0
  31. package/build/Release/obj/forces/forces.obj +0 -0
  32. package/build/Release/obj/forces/forces.tlog/CL.command.1.tlog +0 -0
  33. package/build/Release/obj/forces/forces.tlog/CL.read.1.tlog +0 -0
  34. package/build/Release/obj/forces/forces.tlog/CL.write.1.tlog +0 -0
  35. package/build/Release/obj/forces/forces.tlog/Cl.items.tlog +2 -0
  36. package/build/Release/obj/forces/forces.tlog/forces.lastbuildstate +2 -0
  37. package/build/Release/obj/forces/forces.tlog/link.command.1.tlog +0 -0
  38. package/build/Release/obj/forces/forces.tlog/link.read.1.tlog +0 -0
  39. package/build/Release/obj/forces/forces.tlog/link.secondary.1.tlog +5 -0
  40. package/build/Release/obj/forces/forces.tlog/link.write.1.tlog +0 -0
  41. package/build/Release/obj/forces/win_delay_load_hook.obj +0 -0
  42. package/build/binding.sln +39 -0
  43. package/build/forces.vcxproj +156 -0
  44. package/build/forces.vcxproj.filters +46 -0
  45. package/extra xyz files/traj_GB1-10000s.xyz +451900 -0
  46. package/forces.cpp +194 -0
  47. package/package.json +26 -0
  48. package/pdb/1UBQ.pdb +970 -0
  49. package/pdb/1YRF.pdb +1467 -0
  50. package/pdb/input.pdb +4521 -0
@@ -0,0 +1,1414 @@
1
+ /*******************************************************************************
2
+ * Copyright (c) 2008-2026 The Khronos Group Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ ******************************************************************************/
16
+
17
+ #ifndef __CL_PLATFORM_H
18
+ #define __CL_PLATFORM_H
19
+
20
+ #include <CL/cl_version.h>
21
+
22
+ #ifdef __cplusplus
23
+ extern "C" {
24
+ #endif
25
+
26
+ #if !defined(CL_API_ENTRY)
27
+ #define CL_API_ENTRY
28
+ #endif
29
+ #if !defined(CL_API_CALL)
30
+ #if defined(_WIN32) && !defined(__aarch64__) && !defined(__arm64__)
31
+ #define CL_API_CALL __stdcall
32
+ #else
33
+ #define CL_API_CALL
34
+ #endif
35
+ #endif
36
+ #if !defined(CL_CALLBACK)
37
+ #if defined(_WIN32) && !defined(__aarch64__) && !defined(__arm64__)
38
+ #define CL_CALLBACK __stdcall
39
+ #else
40
+ #define CL_CALLBACK
41
+ #endif
42
+ #endif
43
+
44
+ /*
45
+ * Deprecation flags refer to the last version of the header in which the
46
+ * feature was not deprecated.
47
+ *
48
+ * E.g. VERSION_1_1_DEPRECATED means the feature is present in 1.1 without
49
+ * deprecation but is deprecated in versions later than 1.1.
50
+ */
51
+
52
+ #ifndef CL_API_SUFFIX_USER
53
+ #define CL_API_SUFFIX_USER
54
+ #endif
55
+
56
+ #ifndef CL_API_PREFIX_USER
57
+ #define CL_API_PREFIX_USER
58
+ #endif
59
+
60
+ #define CL_API_SUFFIX_COMMON CL_API_SUFFIX_USER
61
+ #define CL_API_PREFIX_COMMON CL_API_PREFIX_USER
62
+
63
+ #define CL_API_SUFFIX__VERSION_1_0 CL_API_SUFFIX_COMMON
64
+ #define CL_API_SUFFIX__VERSION_1_1 CL_API_SUFFIX_COMMON
65
+ #define CL_API_SUFFIX__VERSION_1_2 CL_API_SUFFIX_COMMON
66
+ #define CL_API_SUFFIX__VERSION_2_0 CL_API_SUFFIX_COMMON
67
+ #define CL_API_SUFFIX__VERSION_2_1 CL_API_SUFFIX_COMMON
68
+ #define CL_API_SUFFIX__VERSION_2_2 CL_API_SUFFIX_COMMON
69
+ #define CL_API_SUFFIX__VERSION_3_0 CL_API_SUFFIX_COMMON
70
+ #define CL_API_SUFFIX__VERSION_3_1 CL_API_SUFFIX_COMMON
71
+ #define CL_API_SUFFIX__EXPERIMENTAL CL_API_SUFFIX_COMMON
72
+
73
+
74
+ #ifdef __GNUC__
75
+ #define CL_API_SUFFIX_DEPRECATED __attribute__((deprecated))
76
+ #define CL_API_PREFIX_DEPRECATED
77
+ #elif defined(_MSC_VER) && !defined(__clang__)
78
+ #define CL_API_SUFFIX_DEPRECATED
79
+ #define CL_API_PREFIX_DEPRECATED __declspec(deprecated)
80
+ #else
81
+ #define CL_API_SUFFIX_DEPRECATED
82
+ #define CL_API_PREFIX_DEPRECATED
83
+ #endif
84
+
85
+ #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
86
+ #define CL_API_SUFFIX__VERSION_1_0_DEPRECATED CL_API_SUFFIX_COMMON
87
+ #define CL_API_PREFIX__VERSION_1_0_DEPRECATED CL_API_PREFIX_COMMON
88
+ #else
89
+ #define CL_API_SUFFIX__VERSION_1_0_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
90
+ #define CL_API_PREFIX__VERSION_1_0_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
91
+ #endif
92
+
93
+ #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
94
+ #define CL_API_SUFFIX__VERSION_1_1_DEPRECATED CL_API_SUFFIX_COMMON
95
+ #define CL_API_PREFIX__VERSION_1_1_DEPRECATED CL_API_PREFIX_COMMON
96
+ #else
97
+ #define CL_API_SUFFIX__VERSION_1_1_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
98
+ #define CL_API_PREFIX__VERSION_1_1_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
99
+ #endif
100
+
101
+ #ifdef CL_USE_DEPRECATED_OPENCL_1_2_APIS
102
+ #define CL_API_SUFFIX__VERSION_1_2_DEPRECATED CL_API_SUFFIX_COMMON
103
+ #define CL_API_PREFIX__VERSION_1_2_DEPRECATED CL_API_PREFIX_COMMON
104
+ #else
105
+ #define CL_API_SUFFIX__VERSION_1_2_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
106
+ #define CL_API_PREFIX__VERSION_1_2_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
107
+ #endif
108
+
109
+ #ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
110
+ #define CL_API_SUFFIX__VERSION_2_0_DEPRECATED CL_API_SUFFIX_COMMON
111
+ #define CL_API_PREFIX__VERSION_2_0_DEPRECATED CL_API_PREFIX_COMMON
112
+ #else
113
+ #define CL_API_SUFFIX__VERSION_2_0_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
114
+ #define CL_API_PREFIX__VERSION_2_0_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
115
+ #endif
116
+
117
+ #ifdef CL_USE_DEPRECATED_OPENCL_2_1_APIS
118
+ #define CL_API_SUFFIX__VERSION_2_1_DEPRECATED CL_API_SUFFIX_COMMON
119
+ #define CL_API_PREFIX__VERSION_2_1_DEPRECATED CL_API_PREFIX_COMMON
120
+ #else
121
+ #define CL_API_SUFFIX__VERSION_2_1_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
122
+ #define CL_API_PREFIX__VERSION_2_1_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
123
+ #endif
124
+
125
+ #ifdef CL_USE_DEPRECATED_OPENCL_2_2_APIS
126
+ #define CL_API_SUFFIX__VERSION_2_2_DEPRECATED CL_API_SUFFIX_COMMON
127
+ #define CL_API_PREFIX__VERSION_2_2_DEPRECATED CL_API_PREFIX_COMMON
128
+ #else
129
+ #define CL_API_SUFFIX__VERSION_2_2_DEPRECATED CL_API_SUFFIX_COMMON CL_API_SUFFIX_DEPRECATED
130
+ #define CL_API_PREFIX__VERSION_2_2_DEPRECATED CL_API_PREFIX_COMMON CL_API_PREFIX_DEPRECATED
131
+ #endif
132
+
133
+ #if (defined (_WIN32) && defined(_MSC_VER))
134
+
135
+ #if defined(__clang__)
136
+ #pragma clang diagnostic push
137
+ #pragma clang diagnostic ignored "-Wlanguage-extension-token"
138
+ #endif
139
+
140
+ /* intptr_t is used in cl.h and provided by stddef.h in Visual C++, but not in clang */
141
+ /* stdint.h was missing before Visual Studio 2010, include it for later versions and for clang */
142
+ #if defined(__clang__) || _MSC_VER >= 1600
143
+ #include <stdint.h>
144
+ #endif
145
+
146
+ /* scalar types */
147
+ typedef signed __int8 cl_char;
148
+ typedef unsigned __int8 cl_uchar;
149
+ typedef signed __int16 cl_short;
150
+ typedef unsigned __int16 cl_ushort;
151
+ typedef signed __int32 cl_int;
152
+ typedef unsigned __int32 cl_uint;
153
+ typedef signed __int64 cl_long;
154
+ typedef unsigned __int64 cl_ulong;
155
+
156
+ typedef unsigned __int16 cl_half;
157
+ typedef float cl_float;
158
+ typedef double cl_double;
159
+
160
+ #if defined(__clang__)
161
+ #pragma clang diagnostic pop
162
+ #endif
163
+
164
+ /* Macro names and corresponding values defined by OpenCL */
165
+ #define CL_CHAR_BIT 8
166
+ #define CL_SCHAR_MAX 127
167
+ #define CL_SCHAR_MIN (-127-1)
168
+ #define CL_CHAR_MAX CL_SCHAR_MAX
169
+ #define CL_CHAR_MIN CL_SCHAR_MIN
170
+ #define CL_UCHAR_MAX 255
171
+ #define CL_SHRT_MAX 32767
172
+ #define CL_SHRT_MIN (-32767-1)
173
+ #define CL_USHRT_MAX 65535
174
+ #define CL_INT_MAX 2147483647
175
+ #define CL_INT_MIN (-2147483647-1)
176
+ #define CL_UINT_MAX 0xffffffffU
177
+ #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
178
+ #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
179
+ #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
180
+
181
+ #define CL_FLT_DIG 6
182
+ #define CL_FLT_MANT_DIG 24
183
+ #define CL_FLT_MAX_10_EXP +38
184
+ #define CL_FLT_MAX_EXP +128
185
+ #define CL_FLT_MIN_10_EXP -37
186
+ #define CL_FLT_MIN_EXP -125
187
+ #define CL_FLT_RADIX 2
188
+ #define CL_FLT_MAX 340282346638528859811704183484516925440.0f
189
+ #define CL_FLT_MIN 1.175494350822287507969e-38f
190
+ #define CL_FLT_EPSILON 1.1920928955078125e-7f
191
+
192
+ #define CL_HALF_DIG 3
193
+ #define CL_HALF_MANT_DIG 11
194
+ #define CL_HALF_MAX_10_EXP +4
195
+ #define CL_HALF_MAX_EXP +16
196
+ #define CL_HALF_MIN_10_EXP -4
197
+ #define CL_HALF_MIN_EXP -13
198
+ #define CL_HALF_RADIX 2
199
+ #define CL_HALF_MAX 65504.0f
200
+ #define CL_HALF_MIN 6.103515625e-05f
201
+ #define CL_HALF_EPSILON 9.765625e-04f
202
+
203
+ #define CL_DBL_DIG 15
204
+ #define CL_DBL_MANT_DIG 53
205
+ #define CL_DBL_MAX_10_EXP +308
206
+ #define CL_DBL_MAX_EXP +1024
207
+ #define CL_DBL_MIN_10_EXP -307
208
+ #define CL_DBL_MIN_EXP -1021
209
+ #define CL_DBL_RADIX 2
210
+ #define CL_DBL_MAX 1.7976931348623158e+308
211
+ #define CL_DBL_MIN 2.225073858507201383090e-308
212
+ #define CL_DBL_EPSILON 2.220446049250313080847e-16
213
+
214
+ #define CL_M_E 2.7182818284590452354
215
+ #define CL_M_LOG2E 1.4426950408889634074
216
+ #define CL_M_LOG10E 0.43429448190325182765
217
+ #define CL_M_LN2 0.69314718055994530942
218
+ #define CL_M_LN10 2.30258509299404568402
219
+ #define CL_M_PI 3.14159265358979323846
220
+ #define CL_M_PI_2 1.57079632679489661923
221
+ #define CL_M_PI_4 0.78539816339744830962
222
+ #define CL_M_1_PI 0.31830988618379067154
223
+ #define CL_M_2_PI 0.63661977236758134308
224
+ #define CL_M_2_SQRTPI 1.12837916709551257390
225
+ #define CL_M_SQRT2 1.41421356237309504880
226
+ #define CL_M_SQRT1_2 0.70710678118654752440
227
+
228
+ #define CL_M_E_F 2.718281828f
229
+ #define CL_M_LOG2E_F 1.442695041f
230
+ #define CL_M_LOG10E_F 0.434294482f
231
+ #define CL_M_LN2_F 0.693147181f
232
+ #define CL_M_LN10_F 2.302585093f
233
+ #define CL_M_PI_F 3.141592654f
234
+ #define CL_M_PI_2_F 1.570796327f
235
+ #define CL_M_PI_4_F 0.785398163f
236
+ #define CL_M_1_PI_F 0.318309886f
237
+ #define CL_M_2_PI_F 0.636619772f
238
+ #define CL_M_2_SQRTPI_F 1.128379167f
239
+ #define CL_M_SQRT2_F 1.414213562f
240
+ #define CL_M_SQRT1_2_F 0.707106781f
241
+
242
+ #define CL_NAN (CL_INFINITY - CL_INFINITY)
243
+ #define CL_HUGE_VALF ((cl_float) 1e50)
244
+ #define CL_HUGE_VAL ((cl_double) (1e300 * 1e300))
245
+ #define CL_MAXFLOAT CL_FLT_MAX
246
+ #define CL_INFINITY CL_HUGE_VALF
247
+
248
+ #else
249
+
250
+ #include <stdint.h>
251
+
252
+ /* scalar types */
253
+ typedef int8_t cl_char;
254
+ typedef uint8_t cl_uchar;
255
+ typedef int16_t cl_short;
256
+ typedef uint16_t cl_ushort;
257
+ typedef int32_t cl_int;
258
+ typedef uint32_t cl_uint;
259
+ typedef int64_t cl_long;
260
+ typedef uint64_t cl_ulong;
261
+
262
+ typedef uint16_t cl_half;
263
+ typedef float cl_float;
264
+ typedef double cl_double;
265
+
266
+ /* Macro names and corresponding values defined by OpenCL */
267
+ #define CL_CHAR_BIT 8
268
+ #define CL_SCHAR_MAX 127
269
+ #define CL_SCHAR_MIN (-127-1)
270
+ #define CL_CHAR_MAX CL_SCHAR_MAX
271
+ #define CL_CHAR_MIN CL_SCHAR_MIN
272
+ #define CL_UCHAR_MAX 255
273
+ #define CL_SHRT_MAX 32767
274
+ #define CL_SHRT_MIN (-32767-1)
275
+ #define CL_USHRT_MAX 65535
276
+ #define CL_INT_MAX 2147483647
277
+ #define CL_INT_MIN (-2147483647-1)
278
+ #define CL_UINT_MAX 0xffffffffU
279
+ #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
280
+ #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
281
+ #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
282
+
283
+ #define CL_FLT_DIG 6
284
+ #define CL_FLT_MANT_DIG 24
285
+ #define CL_FLT_MAX_10_EXP +38
286
+ #define CL_FLT_MAX_EXP +128
287
+ #define CL_FLT_MIN_10_EXP -37
288
+ #define CL_FLT_MIN_EXP -125
289
+ #define CL_FLT_RADIX 2
290
+ #define CL_FLT_MAX 340282346638528859811704183484516925440.0f
291
+ #define CL_FLT_MIN 1.175494350822287507969e-38f
292
+ #define CL_FLT_EPSILON 1.1920928955078125e-7f
293
+
294
+ #define CL_HALF_DIG 3
295
+ #define CL_HALF_MANT_DIG 11
296
+ #define CL_HALF_MAX_10_EXP +4
297
+ #define CL_HALF_MAX_EXP +16
298
+ #define CL_HALF_MIN_10_EXP -4
299
+ #define CL_HALF_MIN_EXP -13
300
+ #define CL_HALF_RADIX 2
301
+ #define CL_HALF_MAX 65504.0f
302
+ #define CL_HALF_MIN 6.103515625e-05f
303
+ #define CL_HALF_EPSILON 9.765625e-04f
304
+
305
+ #define CL_DBL_DIG 15
306
+ #define CL_DBL_MANT_DIG 53
307
+ #define CL_DBL_MAX_10_EXP +308
308
+ #define CL_DBL_MAX_EXP +1024
309
+ #define CL_DBL_MIN_10_EXP -307
310
+ #define CL_DBL_MIN_EXP -1021
311
+ #define CL_DBL_RADIX 2
312
+ #define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
313
+ #define CL_DBL_MIN 2.225073858507201383090e-308
314
+ #define CL_DBL_EPSILON 2.220446049250313080847e-16
315
+
316
+ #define CL_M_E 2.7182818284590452354
317
+ #define CL_M_LOG2E 1.4426950408889634074
318
+ #define CL_M_LOG10E 0.43429448190325182765
319
+ #define CL_M_LN2 0.69314718055994530942
320
+ #define CL_M_LN10 2.30258509299404568402
321
+ #define CL_M_PI 3.14159265358979323846
322
+ #define CL_M_PI_2 1.57079632679489661923
323
+ #define CL_M_PI_4 0.78539816339744830962
324
+ #define CL_M_1_PI 0.31830988618379067154
325
+ #define CL_M_2_PI 0.63661977236758134308
326
+ #define CL_M_2_SQRTPI 1.12837916709551257390
327
+ #define CL_M_SQRT2 1.41421356237309504880
328
+ #define CL_M_SQRT1_2 0.70710678118654752440
329
+
330
+ #define CL_M_E_F 2.718281828f
331
+ #define CL_M_LOG2E_F 1.442695041f
332
+ #define CL_M_LOG10E_F 0.434294482f
333
+ #define CL_M_LN2_F 0.693147181f
334
+ #define CL_M_LN10_F 2.302585093f
335
+ #define CL_M_PI_F 3.141592654f
336
+ #define CL_M_PI_2_F 1.570796327f
337
+ #define CL_M_PI_4_F 0.785398163f
338
+ #define CL_M_1_PI_F 0.318309886f
339
+ #define CL_M_2_PI_F 0.636619772f
340
+ #define CL_M_2_SQRTPI_F 1.128379167f
341
+ #define CL_M_SQRT2_F 1.414213562f
342
+ #define CL_M_SQRT1_2_F 0.707106781f
343
+
344
+ #if defined( __GNUC__ )
345
+ #define CL_HUGE_VALF __builtin_huge_valf()
346
+ #define CL_HUGE_VAL __builtin_huge_val()
347
+ #define CL_NAN __builtin_nanf( "" )
348
+ #else
349
+ #define CL_HUGE_VALF ((cl_float) 1e50)
350
+ #define CL_HUGE_VAL ((cl_double) 1e500)
351
+ float nanf( const char * );
352
+ #define CL_NAN nanf( "" )
353
+ #endif
354
+ #define CL_MAXFLOAT CL_FLT_MAX
355
+ #define CL_INFINITY CL_HUGE_VALF
356
+
357
+ #endif
358
+
359
+ #include <stddef.h>
360
+
361
+ /*
362
+ * Vector types
363
+ *
364
+ * Note: OpenCL requires that all types be naturally aligned.
365
+ * This means that vector types must be naturally aligned.
366
+ * For example, a vector of four floats must be aligned to
367
+ * a 16 byte boundary (calculated as 4 * the natural 4-byte
368
+ * alignment of the float). The alignment qualifiers here
369
+ * will only function properly if your compiler supports them
370
+ * and if you don't actively work to defeat them. For example,
371
+ * in order for a cl_float4 to be 16 byte aligned in a struct,
372
+ * the start of the struct must itself be 16-byte aligned.
373
+ *
374
+ * Maintaining proper alignment is the user's responsibility.
375
+ */
376
+
377
+ /* Define basic vector types */
378
+ #if defined( __VEC__ )
379
+ #if !defined(__clang__)
380
+ #include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
381
+ #endif
382
+ typedef __vector unsigned char __cl_uchar16;
383
+ typedef __vector signed char __cl_char16;
384
+ typedef __vector unsigned short __cl_ushort8;
385
+ typedef __vector signed short __cl_short8;
386
+ typedef __vector unsigned int __cl_uint4;
387
+ typedef __vector signed int __cl_int4;
388
+ typedef __vector float __cl_float4;
389
+ #define __CL_UCHAR16__ 1
390
+ #define __CL_CHAR16__ 1
391
+ #define __CL_USHORT8__ 1
392
+ #define __CL_SHORT8__ 1
393
+ #define __CL_UINT4__ 1
394
+ #define __CL_INT4__ 1
395
+ #define __CL_FLOAT4__ 1
396
+ #endif
397
+
398
+ #if defined( __SSE__ )
399
+ #if defined( __MINGW64__ )
400
+ #include <intrin.h>
401
+ #else
402
+ #include <xmmintrin.h>
403
+ #endif
404
+ #if defined( __GNUC__ )
405
+ typedef float __cl_float4 __attribute__((vector_size(16)));
406
+ #else
407
+ typedef __m128 __cl_float4;
408
+ #endif
409
+ #define __CL_FLOAT4__ 1
410
+ #endif
411
+
412
+ #if defined( __SSE2__ )
413
+ #if defined( __MINGW64__ )
414
+ #include <intrin.h>
415
+ #else
416
+ #include <emmintrin.h>
417
+ #endif
418
+ #if defined( __GNUC__ )
419
+ typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));
420
+ typedef cl_char __cl_char16 __attribute__((vector_size(16)));
421
+ typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));
422
+ typedef cl_short __cl_short8 __attribute__((vector_size(16)));
423
+ typedef cl_uint __cl_uint4 __attribute__((vector_size(16)));
424
+ typedef cl_int __cl_int4 __attribute__((vector_size(16)));
425
+ typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16)));
426
+ typedef cl_long __cl_long2 __attribute__((vector_size(16)));
427
+ typedef cl_double __cl_double2 __attribute__((vector_size(16)));
428
+ #else
429
+ typedef __m128i __cl_uchar16;
430
+ typedef __m128i __cl_char16;
431
+ typedef __m128i __cl_ushort8;
432
+ typedef __m128i __cl_short8;
433
+ typedef __m128i __cl_uint4;
434
+ typedef __m128i __cl_int4;
435
+ typedef __m128i __cl_ulong2;
436
+ typedef __m128i __cl_long2;
437
+ typedef __m128d __cl_double2;
438
+ #endif
439
+ #define __CL_UCHAR16__ 1
440
+ #define __CL_CHAR16__ 1
441
+ #define __CL_USHORT8__ 1
442
+ #define __CL_SHORT8__ 1
443
+ #define __CL_INT4__ 1
444
+ #define __CL_UINT4__ 1
445
+ #define __CL_ULONG2__ 1
446
+ #define __CL_LONG2__ 1
447
+ #define __CL_DOUBLE2__ 1
448
+ #endif
449
+
450
+ #if defined( __MMX__ )
451
+ #include <mmintrin.h>
452
+ #if defined( __GNUC__ )
453
+ typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));
454
+ typedef cl_char __cl_char8 __attribute__((vector_size(8)));
455
+ typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));
456
+ typedef cl_short __cl_short4 __attribute__((vector_size(8)));
457
+ typedef cl_uint __cl_uint2 __attribute__((vector_size(8)));
458
+ typedef cl_int __cl_int2 __attribute__((vector_size(8)));
459
+ typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8)));
460
+ typedef cl_long __cl_long1 __attribute__((vector_size(8)));
461
+ typedef cl_float __cl_float2 __attribute__((vector_size(8)));
462
+ #else
463
+ typedef __m64 __cl_uchar8;
464
+ typedef __m64 __cl_char8;
465
+ typedef __m64 __cl_ushort4;
466
+ typedef __m64 __cl_short4;
467
+ typedef __m64 __cl_uint2;
468
+ typedef __m64 __cl_int2;
469
+ typedef __m64 __cl_ulong1;
470
+ typedef __m64 __cl_long1;
471
+ typedef __m64 __cl_float2;
472
+ #endif
473
+ #define __CL_UCHAR8__ 1
474
+ #define __CL_CHAR8__ 1
475
+ #define __CL_USHORT4__ 1
476
+ #define __CL_SHORT4__ 1
477
+ #define __CL_INT2__ 1
478
+ #define __CL_UINT2__ 1
479
+ #define __CL_ULONG1__ 1
480
+ #define __CL_LONG1__ 1
481
+ #define __CL_FLOAT2__ 1
482
+ #endif
483
+
484
+ #if defined( __AVX__ )
485
+ #if defined( __MINGW64__ )
486
+ #include <intrin.h>
487
+ #else
488
+ #include <immintrin.h>
489
+ #endif
490
+ #if defined( __GNUC__ )
491
+ typedef cl_float __cl_float8 __attribute__((vector_size(32)));
492
+ typedef cl_double __cl_double4 __attribute__((vector_size(32)));
493
+ #else
494
+ typedef __m256 __cl_float8;
495
+ typedef __m256d __cl_double4;
496
+ #endif
497
+ #define __CL_FLOAT8__ 1
498
+ #define __CL_DOUBLE4__ 1
499
+ #endif
500
+
501
+ /* Define capabilities for anonymous struct members. */
502
+ #if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
503
+ #define __CL_HAS_ANON_STRUCT__ 1
504
+ #define __CL_ANON_STRUCT__
505
+ #elif defined(_WIN32) && defined(_MSC_VER) && !defined(__STDC__)
506
+ #define __CL_HAS_ANON_STRUCT__ 1
507
+ #define __CL_ANON_STRUCT__
508
+ #elif defined(__GNUC__) && ! defined(__STRICT_ANSI__)
509
+ #define __CL_HAS_ANON_STRUCT__ 1
510
+ #define __CL_ANON_STRUCT__ __extension__
511
+ #elif defined(__clang__)
512
+ #define __CL_HAS_ANON_STRUCT__ 1
513
+ #define __CL_ANON_STRUCT__ __extension__
514
+ #else
515
+ #define __CL_HAS_ANON_STRUCT__ 0
516
+ #define __CL_ANON_STRUCT__
517
+ #endif
518
+
519
+ /* Define capabilities for anonymous union members. */
520
+ #if defined(__cplusplus) && __cplusplus >= 201103L
521
+ #define __CL_HAS_ANON_UNION__ 1
522
+ #define __CL_ANON_UNION__
523
+ #else
524
+ /* Follow anonymous struct logic */
525
+ #define __CL_HAS_ANON_UNION__ __CL_HAS_ANON_STRUCT__
526
+ #define __CL_ANON_UNION__ __CL_ANON_STRUCT__
527
+ #endif
528
+
529
+ #if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__
530
+ /* Disable warning C4201: nonstandard extension used : nameless struct/union */
531
+ #pragma warning( push )
532
+ #pragma warning( disable : 4201 )
533
+ #endif
534
+
535
+ /* Define alignment keys */
536
+ #if defined( __GNUC__ ) || defined(__INTEGRITY)
537
+ #define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
538
+ #elif defined( _WIN32) && (_MSC_VER)
539
+ /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
540
+ /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */
541
+ /* #include <crtdefs.h> */
542
+ /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */
543
+ #define CL_ALIGNED(_x)
544
+ #else
545
+ #warning Need to implement some method to align data here
546
+ #define CL_ALIGNED(_x)
547
+ #endif
548
+
549
+ /* Indicate whether .xyzw, .s0123 and .hi.lo are supported */
550
+ #if __CL_HAS_ANON_STRUCT__
551
+ /* .xyzw and .s0123...{f|F} are supported */
552
+ #define CL_HAS_NAMED_VECTOR_FIELDS 1
553
+ /* .hi and .lo are supported */
554
+ #define CL_HAS_HI_LO_VECTOR_FIELDS 1
555
+ #endif
556
+
557
+ /* Define cl_vector types */
558
+
559
+ /* ---- cl_charn ---- */
560
+ typedef union
561
+ {
562
+ cl_char CL_ALIGNED(2) s[2];
563
+ #if __CL_HAS_ANON_STRUCT__
564
+ __CL_ANON_STRUCT__ struct{ cl_char x, y; };
565
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1; };
566
+ __CL_ANON_STRUCT__ struct{ cl_char lo, hi; };
567
+ #endif
568
+ #if defined( __CL_CHAR2__)
569
+ __cl_char2 v2;
570
+ #endif
571
+ }cl_char2;
572
+
573
+ typedef union
574
+ {
575
+ cl_char CL_ALIGNED(4) s[4];
576
+ #if __CL_HAS_ANON_STRUCT__
577
+ __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; };
578
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3; };
579
+ __CL_ANON_STRUCT__ struct{ cl_char2 lo, hi; };
580
+ #endif
581
+ #if defined( __CL_CHAR2__)
582
+ __cl_char2 v2[2];
583
+ #endif
584
+ #if defined( __CL_CHAR4__)
585
+ __cl_char4 v4;
586
+ #endif
587
+ }cl_char4;
588
+
589
+ /* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */
590
+ typedef cl_char4 cl_char3;
591
+
592
+ typedef union
593
+ {
594
+ cl_char CL_ALIGNED(8) s[8];
595
+ #if __CL_HAS_ANON_STRUCT__
596
+ __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; };
597
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; };
598
+ __CL_ANON_STRUCT__ struct{ cl_char4 lo, hi; };
599
+ #endif
600
+ #if defined( __CL_CHAR2__)
601
+ __cl_char2 v2[4];
602
+ #endif
603
+ #if defined( __CL_CHAR4__)
604
+ __cl_char4 v4[2];
605
+ #endif
606
+ #if defined( __CL_CHAR8__ )
607
+ __cl_char8 v8;
608
+ #endif
609
+ }cl_char8;
610
+
611
+ typedef union
612
+ {
613
+ cl_char CL_ALIGNED(16) s[16];
614
+ #if __CL_HAS_ANON_STRUCT__
615
+ __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
616
+ __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
617
+ __CL_ANON_STRUCT__ struct{ cl_char8 lo, hi; };
618
+ #endif
619
+ #if defined( __CL_CHAR2__)
620
+ __cl_char2 v2[8];
621
+ #endif
622
+ #if defined( __CL_CHAR4__)
623
+ __cl_char4 v4[4];
624
+ #endif
625
+ #if defined( __CL_CHAR8__ )
626
+ __cl_char8 v8[2];
627
+ #endif
628
+ #if defined( __CL_CHAR16__ )
629
+ __cl_char16 v16;
630
+ #endif
631
+ }cl_char16;
632
+
633
+
634
+ /* ---- cl_ucharn ---- */
635
+ typedef union
636
+ {
637
+ cl_uchar CL_ALIGNED(2) s[2];
638
+ #if __CL_HAS_ANON_STRUCT__
639
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y; };
640
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1; };
641
+ __CL_ANON_STRUCT__ struct{ cl_uchar lo, hi; };
642
+ #endif
643
+ #if defined( __cl_uchar2__)
644
+ __cl_uchar2 v2;
645
+ #endif
646
+ }cl_uchar2;
647
+
648
+ typedef union
649
+ {
650
+ cl_uchar CL_ALIGNED(4) s[4];
651
+ #if __CL_HAS_ANON_STRUCT__
652
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; };
653
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3; };
654
+ __CL_ANON_STRUCT__ struct{ cl_uchar2 lo, hi; };
655
+ #endif
656
+ #if defined( __CL_UCHAR2__)
657
+ __cl_uchar2 v2[2];
658
+ #endif
659
+ #if defined( __CL_UCHAR4__)
660
+ __cl_uchar4 v4;
661
+ #endif
662
+ }cl_uchar4;
663
+
664
+ /* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */
665
+ typedef cl_uchar4 cl_uchar3;
666
+
667
+ typedef union
668
+ {
669
+ cl_uchar CL_ALIGNED(8) s[8];
670
+ #if __CL_HAS_ANON_STRUCT__
671
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; };
672
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; };
673
+ __CL_ANON_STRUCT__ struct{ cl_uchar4 lo, hi; };
674
+ #endif
675
+ #if defined( __CL_UCHAR2__)
676
+ __cl_uchar2 v2[4];
677
+ #endif
678
+ #if defined( __CL_UCHAR4__)
679
+ __cl_uchar4 v4[2];
680
+ #endif
681
+ #if defined( __CL_UCHAR8__ )
682
+ __cl_uchar8 v8;
683
+ #endif
684
+ }cl_uchar8;
685
+
686
+ typedef union
687
+ {
688
+ cl_uchar CL_ALIGNED(16) s[16];
689
+ #if __CL_HAS_ANON_STRUCT__
690
+ __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
691
+ __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
692
+ __CL_ANON_STRUCT__ struct{ cl_uchar8 lo, hi; };
693
+ #endif
694
+ #if defined( __CL_UCHAR2__)
695
+ __cl_uchar2 v2[8];
696
+ #endif
697
+ #if defined( __CL_UCHAR4__)
698
+ __cl_uchar4 v4[4];
699
+ #endif
700
+ #if defined( __CL_UCHAR8__ )
701
+ __cl_uchar8 v8[2];
702
+ #endif
703
+ #if defined( __CL_UCHAR16__ )
704
+ __cl_uchar16 v16;
705
+ #endif
706
+ }cl_uchar16;
707
+
708
+
709
+ /* ---- cl_shortn ---- */
710
+ typedef union
711
+ {
712
+ cl_short CL_ALIGNED(4) s[2];
713
+ #if __CL_HAS_ANON_STRUCT__
714
+ __CL_ANON_STRUCT__ struct{ cl_short x, y; };
715
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1; };
716
+ __CL_ANON_STRUCT__ struct{ cl_short lo, hi; };
717
+ #endif
718
+ #if defined( __CL_SHORT2__)
719
+ __cl_short2 v2;
720
+ #endif
721
+ }cl_short2;
722
+
723
+ typedef union
724
+ {
725
+ cl_short CL_ALIGNED(8) s[4];
726
+ #if __CL_HAS_ANON_STRUCT__
727
+ __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; };
728
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3; };
729
+ __CL_ANON_STRUCT__ struct{ cl_short2 lo, hi; };
730
+ #endif
731
+ #if defined( __CL_SHORT2__)
732
+ __cl_short2 v2[2];
733
+ #endif
734
+ #if defined( __CL_SHORT4__)
735
+ __cl_short4 v4;
736
+ #endif
737
+ }cl_short4;
738
+
739
+ /* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */
740
+ typedef cl_short4 cl_short3;
741
+
742
+ typedef union
743
+ {
744
+ cl_short CL_ALIGNED(16) s[8];
745
+ #if __CL_HAS_ANON_STRUCT__
746
+ __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; };
747
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; };
748
+ __CL_ANON_STRUCT__ struct{ cl_short4 lo, hi; };
749
+ #endif
750
+ #if defined( __CL_SHORT2__)
751
+ __cl_short2 v2[4];
752
+ #endif
753
+ #if defined( __CL_SHORT4__)
754
+ __cl_short4 v4[2];
755
+ #endif
756
+ #if defined( __CL_SHORT8__ )
757
+ __cl_short8 v8;
758
+ #endif
759
+ }cl_short8;
760
+
761
+ typedef union
762
+ {
763
+ cl_short CL_ALIGNED(32) s[16];
764
+ #if __CL_HAS_ANON_STRUCT__
765
+ __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
766
+ __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
767
+ __CL_ANON_STRUCT__ struct{ cl_short8 lo, hi; };
768
+ #endif
769
+ #if defined( __CL_SHORT2__)
770
+ __cl_short2 v2[8];
771
+ #endif
772
+ #if defined( __CL_SHORT4__)
773
+ __cl_short4 v4[4];
774
+ #endif
775
+ #if defined( __CL_SHORT8__ )
776
+ __cl_short8 v8[2];
777
+ #endif
778
+ #if defined( __CL_SHORT16__ )
779
+ __cl_short16 v16;
780
+ #endif
781
+ }cl_short16;
782
+
783
+
784
+ /* ---- cl_ushortn ---- */
785
+ typedef union
786
+ {
787
+ cl_ushort CL_ALIGNED(4) s[2];
788
+ #if __CL_HAS_ANON_STRUCT__
789
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y; };
790
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1; };
791
+ __CL_ANON_STRUCT__ struct{ cl_ushort lo, hi; };
792
+ #endif
793
+ #if defined( __CL_USHORT2__)
794
+ __cl_ushort2 v2;
795
+ #endif
796
+ }cl_ushort2;
797
+
798
+ typedef union
799
+ {
800
+ cl_ushort CL_ALIGNED(8) s[4];
801
+ #if __CL_HAS_ANON_STRUCT__
802
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; };
803
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3; };
804
+ __CL_ANON_STRUCT__ struct{ cl_ushort2 lo, hi; };
805
+ #endif
806
+ #if defined( __CL_USHORT2__)
807
+ __cl_ushort2 v2[2];
808
+ #endif
809
+ #if defined( __CL_USHORT4__)
810
+ __cl_ushort4 v4;
811
+ #endif
812
+ }cl_ushort4;
813
+
814
+ /* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */
815
+ typedef cl_ushort4 cl_ushort3;
816
+
817
+ typedef union
818
+ {
819
+ cl_ushort CL_ALIGNED(16) s[8];
820
+ #if __CL_HAS_ANON_STRUCT__
821
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; };
822
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; };
823
+ __CL_ANON_STRUCT__ struct{ cl_ushort4 lo, hi; };
824
+ #endif
825
+ #if defined( __CL_USHORT2__)
826
+ __cl_ushort2 v2[4];
827
+ #endif
828
+ #if defined( __CL_USHORT4__)
829
+ __cl_ushort4 v4[2];
830
+ #endif
831
+ #if defined( __CL_USHORT8__ )
832
+ __cl_ushort8 v8;
833
+ #endif
834
+ }cl_ushort8;
835
+
836
+ typedef union
837
+ {
838
+ cl_ushort CL_ALIGNED(32) s[16];
839
+ #if __CL_HAS_ANON_STRUCT__
840
+ __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
841
+ __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
842
+ __CL_ANON_STRUCT__ struct{ cl_ushort8 lo, hi; };
843
+ #endif
844
+ #if defined( __CL_USHORT2__)
845
+ __cl_ushort2 v2[8];
846
+ #endif
847
+ #if defined( __CL_USHORT4__)
848
+ __cl_ushort4 v4[4];
849
+ #endif
850
+ #if defined( __CL_USHORT8__ )
851
+ __cl_ushort8 v8[2];
852
+ #endif
853
+ #if defined( __CL_USHORT16__ )
854
+ __cl_ushort16 v16;
855
+ #endif
856
+ }cl_ushort16;
857
+
858
+
859
+ /* ---- cl_halfn ---- */
860
+ typedef union
861
+ {
862
+ cl_half CL_ALIGNED(4) s[2];
863
+ #if __CL_HAS_ANON_STRUCT__
864
+ __CL_ANON_STRUCT__ struct{ cl_half x, y; };
865
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1; };
866
+ __CL_ANON_STRUCT__ struct{ cl_half lo, hi; };
867
+ #endif
868
+ #if defined( __CL_HALF2__)
869
+ __cl_half2 v2;
870
+ #endif
871
+ }cl_half2;
872
+
873
+ typedef union
874
+ {
875
+ cl_half CL_ALIGNED(8) s[4];
876
+ #if __CL_HAS_ANON_STRUCT__
877
+ __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; };
878
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3; };
879
+ __CL_ANON_STRUCT__ struct{ cl_half2 lo, hi; };
880
+ #endif
881
+ #if defined( __CL_HALF2__)
882
+ __cl_half2 v2[2];
883
+ #endif
884
+ #if defined( __CL_HALF4__)
885
+ __cl_half4 v4;
886
+ #endif
887
+ }cl_half4;
888
+
889
+ /* cl_half3 is identical in size, alignment and behavior to cl_half4. See section 6.1.5. */
890
+ typedef cl_half4 cl_half3;
891
+
892
+ typedef union
893
+ {
894
+ cl_half CL_ALIGNED(16) s[8];
895
+ #if __CL_HAS_ANON_STRUCT__
896
+ __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; };
897
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7; };
898
+ __CL_ANON_STRUCT__ struct{ cl_half4 lo, hi; };
899
+ #endif
900
+ #if defined( __CL_HALF2__)
901
+ __cl_half2 v2[4];
902
+ #endif
903
+ #if defined( __CL_HALF4__)
904
+ __cl_half4 v4[2];
905
+ #endif
906
+ #if defined( __CL_HALF8__ )
907
+ __cl_half8 v8;
908
+ #endif
909
+ }cl_half8;
910
+
911
+ typedef union
912
+ {
913
+ cl_half CL_ALIGNED(32) s[16];
914
+ #if __CL_HAS_ANON_STRUCT__
915
+ __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
916
+ __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
917
+ __CL_ANON_STRUCT__ struct{ cl_half8 lo, hi; };
918
+ #endif
919
+ #if defined( __CL_HALF2__)
920
+ __cl_half2 v2[8];
921
+ #endif
922
+ #if defined( __CL_HALF4__)
923
+ __cl_half4 v4[4];
924
+ #endif
925
+ #if defined( __CL_HALF8__ )
926
+ __cl_half8 v8[2];
927
+ #endif
928
+ #if defined( __CL_HALF16__ )
929
+ __cl_half16 v16;
930
+ #endif
931
+ }cl_half16;
932
+
933
+ /* ---- cl_intn ---- */
934
+ typedef union
935
+ {
936
+ cl_int CL_ALIGNED(8) s[2];
937
+ #if __CL_HAS_ANON_STRUCT__
938
+ __CL_ANON_STRUCT__ struct{ cl_int x, y; };
939
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1; };
940
+ __CL_ANON_STRUCT__ struct{ cl_int lo, hi; };
941
+ #endif
942
+ #if defined( __CL_INT2__)
943
+ __cl_int2 v2;
944
+ #endif
945
+ }cl_int2;
946
+
947
+ typedef union
948
+ {
949
+ cl_int CL_ALIGNED(16) s[4];
950
+ #if __CL_HAS_ANON_STRUCT__
951
+ __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; };
952
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3; };
953
+ __CL_ANON_STRUCT__ struct{ cl_int2 lo, hi; };
954
+ #endif
955
+ #if defined( __CL_INT2__)
956
+ __cl_int2 v2[2];
957
+ #endif
958
+ #if defined( __CL_INT4__)
959
+ __cl_int4 v4;
960
+ #endif
961
+ }cl_int4;
962
+
963
+ /* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */
964
+ typedef cl_int4 cl_int3;
965
+
966
+ typedef union
967
+ {
968
+ cl_int CL_ALIGNED(32) s[8];
969
+ #if __CL_HAS_ANON_STRUCT__
970
+ __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; };
971
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; };
972
+ __CL_ANON_STRUCT__ struct{ cl_int4 lo, hi; };
973
+ #endif
974
+ #if defined( __CL_INT2__)
975
+ __cl_int2 v2[4];
976
+ #endif
977
+ #if defined( __CL_INT4__)
978
+ __cl_int4 v4[2];
979
+ #endif
980
+ #if defined( __CL_INT8__ )
981
+ __cl_int8 v8;
982
+ #endif
983
+ }cl_int8;
984
+
985
+ typedef union
986
+ {
987
+ cl_int CL_ALIGNED(64) s[16];
988
+ #if __CL_HAS_ANON_STRUCT__
989
+ __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
990
+ __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
991
+ __CL_ANON_STRUCT__ struct{ cl_int8 lo, hi; };
992
+ #endif
993
+ #if defined( __CL_INT2__)
994
+ __cl_int2 v2[8];
995
+ #endif
996
+ #if defined( __CL_INT4__)
997
+ __cl_int4 v4[4];
998
+ #endif
999
+ #if defined( __CL_INT8__ )
1000
+ __cl_int8 v8[2];
1001
+ #endif
1002
+ #if defined( __CL_INT16__ )
1003
+ __cl_int16 v16;
1004
+ #endif
1005
+ }cl_int16;
1006
+
1007
+
1008
+ /* ---- cl_uintn ---- */
1009
+ typedef union
1010
+ {
1011
+ cl_uint CL_ALIGNED(8) s[2];
1012
+ #if __CL_HAS_ANON_STRUCT__
1013
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y; };
1014
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1; };
1015
+ __CL_ANON_STRUCT__ struct{ cl_uint lo, hi; };
1016
+ #endif
1017
+ #if defined( __CL_UINT2__)
1018
+ __cl_uint2 v2;
1019
+ #endif
1020
+ }cl_uint2;
1021
+
1022
+ typedef union
1023
+ {
1024
+ cl_uint CL_ALIGNED(16) s[4];
1025
+ #if __CL_HAS_ANON_STRUCT__
1026
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; };
1027
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3; };
1028
+ __CL_ANON_STRUCT__ struct{ cl_uint2 lo, hi; };
1029
+ #endif
1030
+ #if defined( __CL_UINT2__)
1031
+ __cl_uint2 v2[2];
1032
+ #endif
1033
+ #if defined( __CL_UINT4__)
1034
+ __cl_uint4 v4;
1035
+ #endif
1036
+ }cl_uint4;
1037
+
1038
+ /* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */
1039
+ typedef cl_uint4 cl_uint3;
1040
+
1041
+ typedef union
1042
+ {
1043
+ cl_uint CL_ALIGNED(32) s[8];
1044
+ #if __CL_HAS_ANON_STRUCT__
1045
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; };
1046
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; };
1047
+ __CL_ANON_STRUCT__ struct{ cl_uint4 lo, hi; };
1048
+ #endif
1049
+ #if defined( __CL_UINT2__)
1050
+ __cl_uint2 v2[4];
1051
+ #endif
1052
+ #if defined( __CL_UINT4__)
1053
+ __cl_uint4 v4[2];
1054
+ #endif
1055
+ #if defined( __CL_UINT8__ )
1056
+ __cl_uint8 v8;
1057
+ #endif
1058
+ }cl_uint8;
1059
+
1060
+ typedef union
1061
+ {
1062
+ cl_uint CL_ALIGNED(64) s[16];
1063
+ #if __CL_HAS_ANON_STRUCT__
1064
+ __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1065
+ __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1066
+ __CL_ANON_STRUCT__ struct{ cl_uint8 lo, hi; };
1067
+ #endif
1068
+ #if defined( __CL_UINT2__)
1069
+ __cl_uint2 v2[8];
1070
+ #endif
1071
+ #if defined( __CL_UINT4__)
1072
+ __cl_uint4 v4[4];
1073
+ #endif
1074
+ #if defined( __CL_UINT8__ )
1075
+ __cl_uint8 v8[2];
1076
+ #endif
1077
+ #if defined( __CL_UINT16__ )
1078
+ __cl_uint16 v16;
1079
+ #endif
1080
+ }cl_uint16;
1081
+
1082
+ /* ---- cl_longn ---- */
1083
+ typedef union
1084
+ {
1085
+ cl_long CL_ALIGNED(16) s[2];
1086
+ #if __CL_HAS_ANON_STRUCT__
1087
+ __CL_ANON_STRUCT__ struct{ cl_long x, y; };
1088
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1; };
1089
+ __CL_ANON_STRUCT__ struct{ cl_long lo, hi; };
1090
+ #endif
1091
+ #if defined( __CL_LONG2__)
1092
+ __cl_long2 v2;
1093
+ #endif
1094
+ }cl_long2;
1095
+
1096
+ typedef union
1097
+ {
1098
+ cl_long CL_ALIGNED(32) s[4];
1099
+ #if __CL_HAS_ANON_STRUCT__
1100
+ __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; };
1101
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3; };
1102
+ __CL_ANON_STRUCT__ struct{ cl_long2 lo, hi; };
1103
+ #endif
1104
+ #if defined( __CL_LONG2__)
1105
+ __cl_long2 v2[2];
1106
+ #endif
1107
+ #if defined( __CL_LONG4__)
1108
+ __cl_long4 v4;
1109
+ #endif
1110
+ }cl_long4;
1111
+
1112
+ /* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */
1113
+ typedef cl_long4 cl_long3;
1114
+
1115
+ typedef union
1116
+ {
1117
+ cl_long CL_ALIGNED(64) s[8];
1118
+ #if __CL_HAS_ANON_STRUCT__
1119
+ __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; };
1120
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; };
1121
+ __CL_ANON_STRUCT__ struct{ cl_long4 lo, hi; };
1122
+ #endif
1123
+ #if defined( __CL_LONG2__)
1124
+ __cl_long2 v2[4];
1125
+ #endif
1126
+ #if defined( __CL_LONG4__)
1127
+ __cl_long4 v4[2];
1128
+ #endif
1129
+ #if defined( __CL_LONG8__ )
1130
+ __cl_long8 v8;
1131
+ #endif
1132
+ }cl_long8;
1133
+
1134
+ typedef union
1135
+ {
1136
+ cl_long CL_ALIGNED(128) s[16];
1137
+ #if __CL_HAS_ANON_STRUCT__
1138
+ __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1139
+ __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1140
+ __CL_ANON_STRUCT__ struct{ cl_long8 lo, hi; };
1141
+ #endif
1142
+ #if defined( __CL_LONG2__)
1143
+ __cl_long2 v2[8];
1144
+ #endif
1145
+ #if defined( __CL_LONG4__)
1146
+ __cl_long4 v4[4];
1147
+ #endif
1148
+ #if defined( __CL_LONG8__ )
1149
+ __cl_long8 v8[2];
1150
+ #endif
1151
+ #if defined( __CL_LONG16__ )
1152
+ __cl_long16 v16;
1153
+ #endif
1154
+ }cl_long16;
1155
+
1156
+
1157
+ /* ---- cl_ulongn ---- */
1158
+ typedef union
1159
+ {
1160
+ cl_ulong CL_ALIGNED(16) s[2];
1161
+ #if __CL_HAS_ANON_STRUCT__
1162
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y; };
1163
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1; };
1164
+ __CL_ANON_STRUCT__ struct{ cl_ulong lo, hi; };
1165
+ #endif
1166
+ #if defined( __CL_ULONG2__)
1167
+ __cl_ulong2 v2;
1168
+ #endif
1169
+ }cl_ulong2;
1170
+
1171
+ typedef union
1172
+ {
1173
+ cl_ulong CL_ALIGNED(32) s[4];
1174
+ #if __CL_HAS_ANON_STRUCT__
1175
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; };
1176
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3; };
1177
+ __CL_ANON_STRUCT__ struct{ cl_ulong2 lo, hi; };
1178
+ #endif
1179
+ #if defined( __CL_ULONG2__)
1180
+ __cl_ulong2 v2[2];
1181
+ #endif
1182
+ #if defined( __CL_ULONG4__)
1183
+ __cl_ulong4 v4;
1184
+ #endif
1185
+ }cl_ulong4;
1186
+
1187
+ /* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */
1188
+ typedef cl_ulong4 cl_ulong3;
1189
+
1190
+ typedef union
1191
+ {
1192
+ cl_ulong CL_ALIGNED(64) s[8];
1193
+ #if __CL_HAS_ANON_STRUCT__
1194
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; };
1195
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; };
1196
+ __CL_ANON_STRUCT__ struct{ cl_ulong4 lo, hi; };
1197
+ #endif
1198
+ #if defined( __CL_ULONG2__)
1199
+ __cl_ulong2 v2[4];
1200
+ #endif
1201
+ #if defined( __CL_ULONG4__)
1202
+ __cl_ulong4 v4[2];
1203
+ #endif
1204
+ #if defined( __CL_ULONG8__ )
1205
+ __cl_ulong8 v8;
1206
+ #endif
1207
+ }cl_ulong8;
1208
+
1209
+ typedef union
1210
+ {
1211
+ cl_ulong CL_ALIGNED(128) s[16];
1212
+ #if __CL_HAS_ANON_STRUCT__
1213
+ __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1214
+ __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1215
+ __CL_ANON_STRUCT__ struct{ cl_ulong8 lo, hi; };
1216
+ #endif
1217
+ #if defined( __CL_ULONG2__)
1218
+ __cl_ulong2 v2[8];
1219
+ #endif
1220
+ #if defined( __CL_ULONG4__)
1221
+ __cl_ulong4 v4[4];
1222
+ #endif
1223
+ #if defined( __CL_ULONG8__ )
1224
+ __cl_ulong8 v8[2];
1225
+ #endif
1226
+ #if defined( __CL_ULONG16__ )
1227
+ __cl_ulong16 v16;
1228
+ #endif
1229
+ }cl_ulong16;
1230
+
1231
+
1232
+ /* --- cl_floatn ---- */
1233
+
1234
+ typedef union
1235
+ {
1236
+ cl_float CL_ALIGNED(8) s[2];
1237
+ #if __CL_HAS_ANON_STRUCT__
1238
+ __CL_ANON_STRUCT__ struct{ cl_float x, y; };
1239
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1; };
1240
+ __CL_ANON_STRUCT__ struct{ cl_float lo, hi; };
1241
+ #endif
1242
+ #if defined( __CL_FLOAT2__)
1243
+ __cl_float2 v2;
1244
+ #endif
1245
+ }cl_float2;
1246
+
1247
+ typedef union
1248
+ {
1249
+ cl_float CL_ALIGNED(16) s[4];
1250
+ #if __CL_HAS_ANON_STRUCT__
1251
+ __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; };
1252
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3; };
1253
+ __CL_ANON_STRUCT__ struct{ cl_float2 lo, hi; };
1254
+ #endif
1255
+ #if defined( __CL_FLOAT2__)
1256
+ __cl_float2 v2[2];
1257
+ #endif
1258
+ #if defined( __CL_FLOAT4__)
1259
+ __cl_float4 v4;
1260
+ #endif
1261
+ }cl_float4;
1262
+
1263
+ /* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */
1264
+ typedef cl_float4 cl_float3;
1265
+
1266
+ typedef union
1267
+ {
1268
+ cl_float CL_ALIGNED(32) s[8];
1269
+ #if __CL_HAS_ANON_STRUCT__
1270
+ __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; };
1271
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; };
1272
+ __CL_ANON_STRUCT__ struct{ cl_float4 lo, hi; };
1273
+ #endif
1274
+ #if defined( __CL_FLOAT2__)
1275
+ __cl_float2 v2[4];
1276
+ #endif
1277
+ #if defined( __CL_FLOAT4__)
1278
+ __cl_float4 v4[2];
1279
+ #endif
1280
+ #if defined( __CL_FLOAT8__ )
1281
+ __cl_float8 v8;
1282
+ #endif
1283
+ }cl_float8;
1284
+
1285
+ typedef union
1286
+ {
1287
+ cl_float CL_ALIGNED(64) s[16];
1288
+ #if __CL_HAS_ANON_STRUCT__
1289
+ __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1290
+ __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1291
+ __CL_ANON_STRUCT__ struct{ cl_float8 lo, hi; };
1292
+ #endif
1293
+ #if defined( __CL_FLOAT2__)
1294
+ __cl_float2 v2[8];
1295
+ #endif
1296
+ #if defined( __CL_FLOAT4__)
1297
+ __cl_float4 v4[4];
1298
+ #endif
1299
+ #if defined( __CL_FLOAT8__ )
1300
+ __cl_float8 v8[2];
1301
+ #endif
1302
+ #if defined( __CL_FLOAT16__ )
1303
+ __cl_float16 v16;
1304
+ #endif
1305
+ }cl_float16;
1306
+
1307
+ /* --- cl_doublen ---- */
1308
+
1309
+ typedef union
1310
+ {
1311
+ cl_double CL_ALIGNED(16) s[2];
1312
+ #if __CL_HAS_ANON_STRUCT__
1313
+ __CL_ANON_STRUCT__ struct{ cl_double x, y; };
1314
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1; };
1315
+ __CL_ANON_STRUCT__ struct{ cl_double lo, hi; };
1316
+ #endif
1317
+ #if defined( __CL_DOUBLE2__)
1318
+ __cl_double2 v2;
1319
+ #endif
1320
+ }cl_double2;
1321
+
1322
+ typedef union
1323
+ {
1324
+ cl_double CL_ALIGNED(32) s[4];
1325
+ #if __CL_HAS_ANON_STRUCT__
1326
+ __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; };
1327
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3; };
1328
+ __CL_ANON_STRUCT__ struct{ cl_double2 lo, hi; };
1329
+ #endif
1330
+ #if defined( __CL_DOUBLE2__)
1331
+ __cl_double2 v2[2];
1332
+ #endif
1333
+ #if defined( __CL_DOUBLE4__)
1334
+ __cl_double4 v4;
1335
+ #endif
1336
+ }cl_double4;
1337
+
1338
+ /* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */
1339
+ typedef cl_double4 cl_double3;
1340
+
1341
+ typedef union
1342
+ {
1343
+ cl_double CL_ALIGNED(64) s[8];
1344
+ #if __CL_HAS_ANON_STRUCT__
1345
+ __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; };
1346
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; };
1347
+ __CL_ANON_STRUCT__ struct{ cl_double4 lo, hi; };
1348
+ #endif
1349
+ #if defined( __CL_DOUBLE2__)
1350
+ __cl_double2 v2[4];
1351
+ #endif
1352
+ #if defined( __CL_DOUBLE4__)
1353
+ __cl_double4 v4[2];
1354
+ #endif
1355
+ #if defined( __CL_DOUBLE8__ )
1356
+ __cl_double8 v8;
1357
+ #endif
1358
+ }cl_double8;
1359
+
1360
+ typedef union
1361
+ {
1362
+ cl_double CL_ALIGNED(128) s[16];
1363
+ #if __CL_HAS_ANON_STRUCT__
1364
+ __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
1365
+ __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
1366
+ __CL_ANON_STRUCT__ struct{ cl_double8 lo, hi; };
1367
+ #endif
1368
+ #if defined( __CL_DOUBLE2__)
1369
+ __cl_double2 v2[8];
1370
+ #endif
1371
+ #if defined( __CL_DOUBLE4__)
1372
+ __cl_double4 v4[4];
1373
+ #endif
1374
+ #if defined( __CL_DOUBLE8__ )
1375
+ __cl_double8 v8[2];
1376
+ #endif
1377
+ #if defined( __CL_DOUBLE16__ )
1378
+ __cl_double16 v16;
1379
+ #endif
1380
+ }cl_double16;
1381
+
1382
+ /* Macro to facilitate debugging
1383
+ * Usage:
1384
+ * Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source.
1385
+ * The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \"
1386
+ * Each line thereafter of OpenCL C source must end with: \n\
1387
+ * The last line ends in ";
1388
+ *
1389
+ * Example:
1390
+ *
1391
+ * const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\
1392
+ * kernel void foo( int a, float * b ) \n\
1393
+ * { \n\
1394
+ * // my comment \n\
1395
+ * *b[ get_global_id(0)] = a; \n\
1396
+ * } \n\
1397
+ * ";
1398
+ *
1399
+ * This should correctly set up the line, (column) and file information for your source
1400
+ * string so you can do source level debugging.
1401
+ */
1402
+ #define __CL_STRINGIFY( _x ) # _x
1403
+ #define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x )
1404
+ #define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n"
1405
+
1406
+ #ifdef __cplusplus
1407
+ }
1408
+ #endif
1409
+
1410
+ #if defined(_WIN32) && defined(_MSC_VER) && __CL_HAS_ANON_STRUCT__
1411
+ #pragma warning( pop )
1412
+ #endif
1413
+
1414
+ #endif /* __CL_PLATFORM_H */