cl_platform.h 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085
  1. /**********************************************************************************
  2. * Copyright (c) 2008-2010 The Khronos Group Inc.
  3. *
  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:
  11. *
  12. * The above copyright notice and this permission notice shall be included
  13. * in all copies or substantial portions of the Materials.
  14. *
  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. **********************************************************************************/
  23. /* $Revision: 14830 $ on $Date: 2011-05-26 08:34:31 -0700 (Thu, 26 May 2011) $ */
  24. #ifndef __CL_PLATFORM_H
  25. #define __CL_PLATFORM_H
  26. #ifdef __APPLE__
  27. /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */
  28. #include <AvailabilityMacros.h>
  29. #endif
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. #if defined(_WIN32)
  34. #define CL_API_ENTRY
  35. #define CL_API_CALL __stdcall
  36. #else
  37. #define CL_API_ENTRY
  38. #define CL_API_CALL
  39. #endif
  40. #ifdef __APPLE__
  41. #define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
  42. #define CL_API_SUFFIX__VERSION_1_1
  43. #define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
  44. #else
  45. #define CL_API_SUFFIX__VERSION_1_0
  46. #define CL_API_SUFFIX__VERSION_1_1
  47. #define CL_EXTENSION_WEAK_LINK
  48. #endif
  49. #if (defined (_WIN32) && defined(_MSC_VER))
  50. /* scalar types */
  51. typedef signed __int8 cl_char;
  52. typedef unsigned __int8 cl_uchar;
  53. typedef signed __int16 cl_short;
  54. typedef unsigned __int16 cl_ushort;
  55. typedef signed __int32 cl_int;
  56. typedef unsigned __int32 cl_uint;
  57. typedef signed __int64 cl_long;
  58. typedef unsigned __int64 cl_ulong;
  59. typedef unsigned __int16 cl_half;
  60. typedef float cl_float;
  61. typedef double cl_double;
  62. /* Macro names and corresponding values defined by OpenCL */
  63. #define CL_CHAR_BIT 8
  64. #define CL_SCHAR_MAX 127
  65. #define CL_SCHAR_MIN (-127-1)
  66. #define CL_CHAR_MAX CL_SCHAR_MAX
  67. #define CL_CHAR_MIN CL_SCHAR_MIN
  68. #define CL_UCHAR_MAX 255
  69. #define CL_SHRT_MAX 32767
  70. #define CL_SHRT_MIN (-32767-1)
  71. #define CL_USHRT_MAX 65535
  72. #define CL_INT_MAX 2147483647
  73. #define CL_INT_MIN (-2147483647-1)
  74. #define CL_UINT_MAX 0xffffffffU
  75. #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
  76. #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
  77. #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
  78. #define CL_FLT_DIG 6
  79. #define CL_FLT_MANT_DIG 24
  80. #define CL_FLT_MAX_10_EXP +38
  81. #define CL_FLT_MAX_EXP +128
  82. #define CL_FLT_MIN_10_EXP -37
  83. #define CL_FLT_MIN_EXP -125
  84. #define CL_FLT_RADIX 2
  85. #define CL_FLT_MAX 340282346638528859811704183484516925440.0f
  86. #define CL_FLT_MIN 1.175494350822287507969e-38f
  87. #define CL_FLT_EPSILON 0x1.0p-23f
  88. #define CL_DBL_DIG 15
  89. #define CL_DBL_MANT_DIG 53
  90. #define CL_DBL_MAX_10_EXP +308
  91. #define CL_DBL_MAX_EXP +1024
  92. #define CL_DBL_MIN_10_EXP -307
  93. #define CL_DBL_MIN_EXP -1021
  94. #define CL_DBL_RADIX 2
  95. #define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
  96. #define CL_DBL_MIN 2.225073858507201383090e-308
  97. #define CL_DBL_EPSILON 2.220446049250313080847e-16
  98. #define CL_NAN (CL_INFINITY - CL_INFINITY)
  99. #define CL_HUGE_VALF ((cl_float) 1e50)
  100. #define CL_HUGE_VAL ((cl_double) 1e500)
  101. #define CL_MAXFLOAT CL_FLT_MAX
  102. #define CL_INFINITY CL_HUGE_VALF
  103. #define CL_CALLBACK __stdcall
  104. #else
  105. #include <stdint.h>
  106. /* scalar types */
  107. typedef int8_t cl_char;
  108. typedef uint8_t cl_uchar;
  109. typedef int16_t cl_short __attribute__((aligned(2)));
  110. typedef uint16_t cl_ushort __attribute__((aligned(2)));
  111. typedef int32_t cl_int __attribute__((aligned(4)));
  112. typedef uint32_t cl_uint __attribute__((aligned(4)));
  113. typedef int64_t cl_long __attribute__((aligned(8)));
  114. typedef uint64_t cl_ulong __attribute__((aligned(8)));
  115. typedef uint16_t cl_half __attribute__((aligned(2)));
  116. typedef float cl_float __attribute__((aligned(4)));
  117. typedef double cl_double __attribute__((aligned(8)));
  118. /* Macro names and corresponding values defined by OpenCL */
  119. #define CL_CHAR_BIT 8
  120. #define CL_SCHAR_MAX 127
  121. #define CL_SCHAR_MIN (-127-1)
  122. #define CL_CHAR_MAX CL_SCHAR_MAX
  123. #define CL_CHAR_MIN CL_SCHAR_MIN
  124. #define CL_UCHAR_MAX 255
  125. #define CL_SHRT_MAX 32767
  126. #define CL_SHRT_MIN (-32767-1)
  127. #define CL_USHRT_MAX 65535
  128. #define CL_INT_MAX 2147483647
  129. #define CL_INT_MIN (-2147483647-1)
  130. #define CL_UINT_MAX 0xffffffffU
  131. #define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
  132. #define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
  133. #define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
  134. #define CL_FLT_DIG 6
  135. #define CL_FLT_MANT_DIG 24
  136. #define CL_FLT_MAX_10_EXP +38
  137. #define CL_FLT_MAX_EXP +128
  138. #define CL_FLT_MIN_10_EXP -37
  139. #define CL_FLT_MIN_EXP -125
  140. #define CL_FLT_RADIX 2
  141. #define CL_FLT_MAX 0x1.fffffep127f
  142. #define CL_FLT_MIN 0x1.0p-126f
  143. #define CL_FLT_EPSILON 0x1.0p-23f
  144. #define CL_DBL_DIG 15
  145. #define CL_DBL_MANT_DIG 53
  146. #define CL_DBL_MAX_10_EXP +308
  147. #define CL_DBL_MAX_EXP +1024
  148. #define CL_DBL_MIN_10_EXP -307
  149. #define CL_DBL_MIN_EXP -1021
  150. #define CL_DBL_RADIX 2
  151. #define CL_DBL_MAX 0x1.fffffffffffffp1023
  152. #define CL_DBL_MIN 0x1.0p-1022
  153. #define CL_DBL_EPSILON 0x1.0p-52
  154. #if (defined( __GNUC__ ) || defined( __IBMC__ ))
  155. #define CL_HUGE_VALF __builtin_huge_valf()
  156. #define CL_HUGE_VAL __builtin_huge_val()
  157. #define CL_NAN __builtin_nanf( "" )
  158. #else
  159. #define CL_HUGE_VALF ((cl_float) 1e50)
  160. #define CL_HUGE_VAL ((cl_double) 1e500)
  161. float nanf( const char * );
  162. #define CL_NAN nanf( "" )
  163. #endif
  164. #define CL_MAXFLOAT CL_FLT_MAX
  165. #define CL_INFINITY CL_HUGE_VALF
  166. #define CL_CALLBACK
  167. #endif
  168. #include <stddef.h>
  169. /* 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. */
  170. typedef unsigned int cl_GLuint;
  171. typedef int cl_GLint;
  172. typedef unsigned int cl_GLenum;
  173. /*
  174. * Vector types
  175. *
  176. * Note: OpenCL requires that all types be naturally aligned.
  177. * This means that vector types must be naturally aligned.
  178. * For example, a vector of four floats must be aligned to
  179. * a 16 byte boundary (calculated as 4 * the natural 4-byte
  180. * alignment of the float). The alignment qualifiers here
  181. * will only function properly if your compiler supports them
  182. * and if you don't actively work to defeat them. For example,
  183. * in order for a cl_float4 to be 16 byte aligned in a struct,
  184. * the start of the struct must itself be 16-byte aligned.
  185. *
  186. * Maintaining proper alignment is the user's responsibility.
  187. */
  188. /* Define basic vector types */
  189. #if defined( __VEC__ )
  190. #include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
  191. typedef vector unsigned char __cl_uchar16;
  192. typedef vector signed char __cl_char16;
  193. typedef vector unsigned short __cl_ushort8;
  194. typedef vector signed short __cl_short8;
  195. typedef vector unsigned int __cl_uint4;
  196. typedef vector signed int __cl_int4;
  197. typedef vector float __cl_float4;
  198. #define __CL_UCHAR16__ 1
  199. #define __CL_CHAR16__ 1
  200. #define __CL_USHORT8__ 1
  201. #define __CL_SHORT8__ 1
  202. #define __CL_UINT4__ 1
  203. #define __CL_INT4__ 1
  204. #define __CL_FLOAT4__ 1
  205. #endif
  206. #if defined( __SSE__ )
  207. #if defined( __MINGW64__ )
  208. #include <intrin.h>
  209. #else
  210. #include <xmmintrin.h>
  211. #endif
  212. #if defined( __GNUC__ )
  213. typedef float __cl_float4 __attribute__((vector_size(16)));
  214. #else
  215. typedef __m128 __cl_float4;
  216. #endif
  217. #define __CL_FLOAT4__ 1
  218. #endif
  219. #if defined( __SSE2__ )
  220. #if defined( __MINGW64__ )
  221. #include <intrin.h>
  222. #else
  223. #include <emmintrin.h>
  224. #endif
  225. #if defined( __GNUC__ )
  226. typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));
  227. typedef cl_char __cl_char16 __attribute__((vector_size(16)));
  228. typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));
  229. typedef cl_short __cl_short8 __attribute__((vector_size(16)));
  230. typedef cl_uint __cl_uint4 __attribute__((vector_size(16)));
  231. typedef cl_int __cl_int4 __attribute__((vector_size(16)));
  232. typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16)));
  233. typedef cl_long __cl_long2 __attribute__((vector_size(16)));
  234. typedef cl_double __cl_double2 __attribute__((vector_size(16)));
  235. #else
  236. typedef __m128i __cl_uchar16;
  237. typedef __m128i __cl_char16;
  238. typedef __m128i __cl_ushort8;
  239. typedef __m128i __cl_short8;
  240. typedef __m128i __cl_uint4;
  241. typedef __m128i __cl_int4;
  242. typedef __m128i __cl_ulong2;
  243. typedef __m128i __cl_long2;
  244. typedef __m128d __cl_double2;
  245. #endif
  246. #define __CL_UCHAR16__ 1
  247. #define __CL_CHAR16__ 1
  248. #define __CL_USHORT8__ 1
  249. #define __CL_SHORT8__ 1
  250. #define __CL_INT4__ 1
  251. #define __CL_UINT4__ 1
  252. #define __CL_ULONG2__ 1
  253. #define __CL_LONG2__ 1
  254. #define __CL_DOUBLE2__ 1
  255. #endif
  256. #if defined( __MMX__ )
  257. #include <mmintrin.h>
  258. #if defined( __GNUC__ )
  259. typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));
  260. typedef cl_char __cl_char8 __attribute__((vector_size(8)));
  261. typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));
  262. typedef cl_short __cl_short4 __attribute__((vector_size(8)));
  263. typedef cl_uint __cl_uint2 __attribute__((vector_size(8)));
  264. typedef cl_int __cl_int2 __attribute__((vector_size(8)));
  265. typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8)));
  266. typedef cl_long __cl_long1 __attribute__((vector_size(8)));
  267. typedef cl_float __cl_float2 __attribute__((vector_size(8)));
  268. #else
  269. typedef __m64 __cl_uchar8;
  270. typedef __m64 __cl_char8;
  271. typedef __m64 __cl_ushort4;
  272. typedef __m64 __cl_short4;
  273. typedef __m64 __cl_uint2;
  274. typedef __m64 __cl_int2;
  275. typedef __m64 __cl_ulong1;
  276. typedef __m64 __cl_long1;
  277. typedef __m64 __cl_float2;
  278. #endif
  279. #define __CL_UCHAR8__ 1
  280. #define __CL_CHAR8__ 1
  281. #define __CL_USHORT4__ 1
  282. #define __CL_SHORT4__ 1
  283. #define __CL_INT2__ 1
  284. #define __CL_UINT2__ 1
  285. #define __CL_ULONG1__ 1
  286. #define __CL_LONG1__ 1
  287. #define __CL_FLOAT2__ 1
  288. #endif
  289. #if defined( __AVX__ )
  290. #if defined( __MINGW64__ )
  291. #include <intrin.h>
  292. #else
  293. #include <immintrin.h>
  294. #endif
  295. #if defined( __GNUC__ )
  296. typedef cl_float __cl_float8 __attribute__((vector_size(32)));
  297. typedef cl_double __cl_double4 __attribute__((vector_size(32)));
  298. #else
  299. typedef __m256 __cl_float8;
  300. typedef __m256d __cl_double4;
  301. #endif
  302. #define __CL_FLOAT8__ 1
  303. #define __CL_DOUBLE4__ 1
  304. #endif
  305. /* Define alignment keys */
  306. #if (defined( __GNUC__ ) || defined( __IBMC__ ))
  307. #define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
  308. #elif defined( _WIN32) && (_MSC_VER)
  309. /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
  310. /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */
  311. /* #include <crtdefs.h> */
  312. /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */
  313. #define CL_ALIGNED(_x)
  314. #else
  315. #warning Need to implement some method to align data here
  316. #define CL_ALIGNED(_x)
  317. #endif
  318. /* Indicate whether .xyzw, .s0123 and .hi.lo are supported */
  319. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  320. /* .xyzw and .s0123...{f|F} are supported */
  321. #define CL_HAS_NAMED_VECTOR_FIELDS 1
  322. /* .hi and .lo are supported */
  323. #define CL_HAS_HI_LO_VECTOR_FIELDS 1
  324. #endif
  325. /* Define cl_vector types */
  326. /* ---- cl_charn ---- */
  327. typedef union
  328. {
  329. cl_char CL_ALIGNED(2) s[2];
  330. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  331. __extension__ struct{ cl_char x, y; };
  332. __extension__ struct{ cl_char s0, s1; };
  333. __extension__ struct{ cl_char lo, hi; };
  334. #endif
  335. #if defined( __CL_CHAR2__)
  336. __cl_char2 v2;
  337. #endif
  338. }cl_char2;
  339. typedef union
  340. {
  341. cl_char CL_ALIGNED(4) s[4];
  342. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  343. __extension__ struct{ cl_char x, y, z, w; };
  344. __extension__ struct{ cl_char s0, s1, s2, s3; };
  345. __extension__ struct{ cl_char2 lo, hi; };
  346. #endif
  347. #if defined( __CL_CHAR2__)
  348. __cl_char2 v2[2];
  349. #endif
  350. #if defined( __CL_CHAR4__)
  351. __cl_char4 v4;
  352. #endif
  353. }cl_char4;
  354. typedef union
  355. {
  356. cl_char CL_ALIGNED(8) s[8];
  357. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  358. __extension__ struct{ cl_char x, y, z, w; };
  359. __extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; };
  360. __extension__ struct{ cl_char4 lo, hi; };
  361. #endif
  362. #if defined( __CL_CHAR2__)
  363. __cl_char2 v2[4];
  364. #endif
  365. #if defined( __CL_CHAR4__)
  366. __cl_char4 v4[2];
  367. #endif
  368. #if defined( __CL_CHAR8__ )
  369. __cl_char8 v8;
  370. #endif
  371. }cl_char8;
  372. typedef union
  373. {
  374. cl_char CL_ALIGNED(16) s[16];
  375. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  376. __extension__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
  377. __extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
  378. __extension__ struct{ cl_char8 lo, hi; };
  379. #endif
  380. #if defined( __CL_CHAR2__)
  381. __cl_char2 v2[8];
  382. #endif
  383. #if defined( __CL_CHAR4__)
  384. __cl_char4 v4[4];
  385. #endif
  386. #if defined( __CL_CHAR8__ )
  387. __cl_char8 v8[2];
  388. #endif
  389. #if defined( __CL_CHAR16__ )
  390. __cl_char16 v16;
  391. #endif
  392. }cl_char16;
  393. /* ---- cl_ucharn ---- */
  394. typedef union
  395. {
  396. cl_uchar CL_ALIGNED(2) s[2];
  397. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  398. __extension__ struct{ cl_uchar x, y; };
  399. __extension__ struct{ cl_uchar s0, s1; };
  400. __extension__ struct{ cl_uchar lo, hi; };
  401. #endif
  402. #if defined( __cl_uchar2__)
  403. __cl_uchar2 v2;
  404. #endif
  405. }cl_uchar2;
  406. typedef union
  407. {
  408. cl_uchar CL_ALIGNED(4) s[4];
  409. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  410. __extension__ struct{ cl_uchar x, y, z, w; };
  411. __extension__ struct{ cl_uchar s0, s1, s2, s3; };
  412. __extension__ struct{ cl_uchar2 lo, hi; };
  413. #endif
  414. #if defined( __CL_UCHAR2__)
  415. __cl_uchar2 v2[2];
  416. #endif
  417. #if defined( __CL_UCHAR4__)
  418. __cl_uchar4 v4;
  419. #endif
  420. }cl_uchar4;
  421. typedef union
  422. {
  423. cl_uchar CL_ALIGNED(8) s[8];
  424. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  425. __extension__ struct{ cl_uchar x, y, z, w; };
  426. __extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; };
  427. __extension__ struct{ cl_uchar4 lo, hi; };
  428. #endif
  429. #if defined( __CL_UCHAR2__)
  430. __cl_uchar2 v2[4];
  431. #endif
  432. #if defined( __CL_UCHAR4__)
  433. __cl_uchar4 v4[2];
  434. #endif
  435. #if defined( __CL_UCHAR8__ )
  436. __cl_uchar8 v8;
  437. #endif
  438. }cl_uchar8;
  439. typedef union
  440. {
  441. cl_uchar CL_ALIGNED(16) s[16];
  442. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  443. __extension__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
  444. __extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
  445. __extension__ struct{ cl_uchar8 lo, hi; };
  446. #endif
  447. #if defined( __CL_UCHAR2__)
  448. __cl_uchar2 v2[8];
  449. #endif
  450. #if defined( __CL_UCHAR4__)
  451. __cl_uchar4 v4[4];
  452. #endif
  453. #if defined( __CL_UCHAR8__ )
  454. __cl_uchar8 v8[2];
  455. #endif
  456. #if defined( __CL_UCHAR16__ )
  457. __cl_uchar16 v16;
  458. #endif
  459. }cl_uchar16;
  460. /* ---- cl_shortn ---- */
  461. typedef union
  462. {
  463. cl_short CL_ALIGNED(4) s[2];
  464. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  465. __extension__ struct{ cl_short x, y; };
  466. __extension__ struct{ cl_short s0, s1; };
  467. __extension__ struct{ cl_short lo, hi; };
  468. #endif
  469. #if defined( __CL_SHORT2__)
  470. __cl_short2 v2;
  471. #endif
  472. }cl_short2;
  473. typedef union
  474. {
  475. cl_short CL_ALIGNED(8) s[4];
  476. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  477. __extension__ struct{ cl_short x, y, z, w; };
  478. __extension__ struct{ cl_short s0, s1, s2, s3; };
  479. __extension__ struct{ cl_short2 lo, hi; };
  480. #endif
  481. #if defined( __CL_SHORT2__)
  482. __cl_short2 v2[2];
  483. #endif
  484. #if defined( __CL_SHORT4__)
  485. __cl_short4 v4;
  486. #endif
  487. }cl_short4;
  488. typedef union
  489. {
  490. cl_short CL_ALIGNED(16) s[8];
  491. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  492. __extension__ struct{ cl_short x, y, z, w; };
  493. __extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; };
  494. __extension__ struct{ cl_short4 lo, hi; };
  495. #endif
  496. #if defined( __CL_SHORT2__)
  497. __cl_short2 v2[4];
  498. #endif
  499. #if defined( __CL_SHORT4__)
  500. __cl_short4 v4[2];
  501. #endif
  502. #if defined( __CL_SHORT8__ )
  503. __cl_short8 v8;
  504. #endif
  505. }cl_short8;
  506. typedef union
  507. {
  508. cl_short CL_ALIGNED(32) s[16];
  509. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  510. __extension__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
  511. __extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
  512. __extension__ struct{ cl_short8 lo, hi; };
  513. #endif
  514. #if defined( __CL_SHORT2__)
  515. __cl_short2 v2[8];
  516. #endif
  517. #if defined( __CL_SHORT4__)
  518. __cl_short4 v4[4];
  519. #endif
  520. #if defined( __CL_SHORT8__ )
  521. __cl_short8 v8[2];
  522. #endif
  523. #if defined( __CL_SHORT16__ )
  524. __cl_short16 v16;
  525. #endif
  526. }cl_short16;
  527. /* ---- cl_ushortn ---- */
  528. typedef union
  529. {
  530. cl_ushort CL_ALIGNED(4) s[2];
  531. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  532. __extension__ struct{ cl_ushort x, y; };
  533. __extension__ struct{ cl_ushort s0, s1; };
  534. __extension__ struct{ cl_ushort lo, hi; };
  535. #endif
  536. #if defined( __CL_USHORT2__)
  537. __cl_ushort2 v2;
  538. #endif
  539. }cl_ushort2;
  540. typedef union
  541. {
  542. cl_ushort CL_ALIGNED(8) s[4];
  543. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  544. __extension__ struct{ cl_ushort x, y, z, w; };
  545. __extension__ struct{ cl_ushort s0, s1, s2, s3; };
  546. __extension__ struct{ cl_ushort2 lo, hi; };
  547. #endif
  548. #if defined( __CL_USHORT2__)
  549. __cl_ushort2 v2[2];
  550. #endif
  551. #if defined( __CL_USHORT4__)
  552. __cl_ushort4 v4;
  553. #endif
  554. }cl_ushort4;
  555. typedef union
  556. {
  557. cl_ushort CL_ALIGNED(16) s[8];
  558. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  559. __extension__ struct{ cl_ushort x, y, z, w; };
  560. __extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; };
  561. __extension__ struct{ cl_ushort4 lo, hi; };
  562. #endif
  563. #if defined( __CL_USHORT2__)
  564. __cl_ushort2 v2[4];
  565. #endif
  566. #if defined( __CL_USHORT4__)
  567. __cl_ushort4 v4[2];
  568. #endif
  569. #if defined( __CL_USHORT8__ )
  570. __cl_ushort8 v8;
  571. #endif
  572. }cl_ushort8;
  573. typedef union
  574. {
  575. cl_ushort CL_ALIGNED(32) s[16];
  576. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  577. __extension__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
  578. __extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
  579. __extension__ struct{ cl_ushort8 lo, hi; };
  580. #endif
  581. #if defined( __CL_USHORT2__)
  582. __cl_ushort2 v2[8];
  583. #endif
  584. #if defined( __CL_USHORT4__)
  585. __cl_ushort4 v4[4];
  586. #endif
  587. #if defined( __CL_USHORT8__ )
  588. __cl_ushort8 v8[2];
  589. #endif
  590. #if defined( __CL_USHORT16__ )
  591. __cl_ushort16 v16;
  592. #endif
  593. }cl_ushort16;
  594. /* ---- cl_intn ---- */
  595. typedef union
  596. {
  597. cl_int CL_ALIGNED(8) s[2];
  598. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  599. __extension__ struct{ cl_int x, y; };
  600. __extension__ struct{ cl_int s0, s1; };
  601. __extension__ struct{ cl_int lo, hi; };
  602. #endif
  603. #if defined( __CL_INT2__)
  604. __cl_int2 v2;
  605. #endif
  606. }cl_int2;
  607. typedef union
  608. {
  609. cl_int CL_ALIGNED(16) s[4];
  610. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  611. __extension__ struct{ cl_int x, y, z, w; };
  612. __extension__ struct{ cl_int s0, s1, s2, s3; };
  613. __extension__ struct{ cl_int2 lo, hi; };
  614. #endif
  615. #if defined( __CL_INT2__)
  616. __cl_int2 v2[2];
  617. #endif
  618. #if defined( __CL_INT4__)
  619. __cl_int4 v4;
  620. #endif
  621. }cl_int4;
  622. typedef union
  623. {
  624. cl_int CL_ALIGNED(32) s[8];
  625. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  626. __extension__ struct{ cl_int x, y, z, w; };
  627. __extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; };
  628. __extension__ struct{ cl_int4 lo, hi; };
  629. #endif
  630. #if defined( __CL_INT2__)
  631. __cl_int2 v2[4];
  632. #endif
  633. #if defined( __CL_INT4__)
  634. __cl_int4 v4[2];
  635. #endif
  636. #if defined( __CL_INT8__ )
  637. __cl_int8 v8;
  638. #endif
  639. }cl_int8;
  640. typedef union
  641. {
  642. cl_int CL_ALIGNED(64) s[16];
  643. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  644. __extension__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
  645. __extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
  646. __extension__ struct{ cl_int8 lo, hi; };
  647. #endif
  648. #if defined( __CL_INT2__)
  649. __cl_int2 v2[8];
  650. #endif
  651. #if defined( __CL_INT4__)
  652. __cl_int4 v4[4];
  653. #endif
  654. #if defined( __CL_INT8__ )
  655. __cl_int8 v8[2];
  656. #endif
  657. #if defined( __CL_INT16__ )
  658. __cl_int16 v16;
  659. #endif
  660. }cl_int16;
  661. /* ---- cl_uintn ---- */
  662. typedef union
  663. {
  664. cl_uint CL_ALIGNED(8) s[2];
  665. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  666. __extension__ struct{ cl_uint x, y; };
  667. __extension__ struct{ cl_uint s0, s1; };
  668. __extension__ struct{ cl_uint lo, hi; };
  669. #endif
  670. #if defined( __CL_UINT2__)
  671. __cl_uint2 v2;
  672. #endif
  673. }cl_uint2;
  674. typedef union
  675. {
  676. cl_uint CL_ALIGNED(16) s[4];
  677. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  678. __extension__ struct{ cl_uint x, y, z, w; };
  679. __extension__ struct{ cl_uint s0, s1, s2, s3; };
  680. __extension__ struct{ cl_uint2 lo, hi; };
  681. #endif
  682. #if defined( __CL_UINT2__)
  683. __cl_uint2 v2[2];
  684. #endif
  685. #if defined( __CL_UINT4__)
  686. __cl_uint4 v4;
  687. #endif
  688. }cl_uint4;
  689. typedef union
  690. {
  691. cl_uint CL_ALIGNED(32) s[8];
  692. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  693. __extension__ struct{ cl_uint x, y, z, w; };
  694. __extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; };
  695. __extension__ struct{ cl_uint4 lo, hi; };
  696. #endif
  697. #if defined( __CL_UINT2__)
  698. __cl_uint2 v2[4];
  699. #endif
  700. #if defined( __CL_UINT4__)
  701. __cl_uint4 v4[2];
  702. #endif
  703. #if defined( __CL_UINT8__ )
  704. __cl_uint8 v8;
  705. #endif
  706. }cl_uint8;
  707. typedef union
  708. {
  709. cl_uint CL_ALIGNED(64) s[16];
  710. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  711. __extension__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
  712. __extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
  713. __extension__ struct{ cl_uint8 lo, hi; };
  714. #endif
  715. #if defined( __CL_UINT2__)
  716. __cl_uint2 v2[8];
  717. #endif
  718. #if defined( __CL_UINT4__)
  719. __cl_uint4 v4[4];
  720. #endif
  721. #if defined( __CL_UINT8__ )
  722. __cl_uint8 v8[2];
  723. #endif
  724. #if defined( __CL_UINT16__ )
  725. __cl_uint16 v16;
  726. #endif
  727. }cl_uint16;
  728. /* ---- cl_longn ---- */
  729. typedef union
  730. {
  731. cl_long CL_ALIGNED(16) s[2];
  732. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  733. __extension__ struct{ cl_long x, y; };
  734. __extension__ struct{ cl_long s0, s1; };
  735. __extension__ struct{ cl_long lo, hi; };
  736. #endif
  737. #if defined( __CL_LONG2__)
  738. __cl_long2 v2;
  739. #endif
  740. }cl_long2;
  741. typedef union
  742. {
  743. cl_long CL_ALIGNED(32) s[4];
  744. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  745. __extension__ struct{ cl_long x, y, z, w; };
  746. __extension__ struct{ cl_long s0, s1, s2, s3; };
  747. __extension__ struct{ cl_long2 lo, hi; };
  748. #endif
  749. #if defined( __CL_LONG2__)
  750. __cl_long2 v2[2];
  751. #endif
  752. #if defined( __CL_LONG4__)
  753. __cl_long4 v4;
  754. #endif
  755. }cl_long4;
  756. typedef union
  757. {
  758. cl_long CL_ALIGNED(64) s[8];
  759. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  760. __extension__ struct{ cl_long x, y, z, w; };
  761. __extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; };
  762. __extension__ struct{ cl_long4 lo, hi; };
  763. #endif
  764. #if defined( __CL_LONG2__)
  765. __cl_long2 v2[4];
  766. #endif
  767. #if defined( __CL_LONG4__)
  768. __cl_long4 v4[2];
  769. #endif
  770. #if defined( __CL_LONG8__ )
  771. __cl_long8 v8;
  772. #endif
  773. }cl_long8;
  774. typedef union
  775. {
  776. cl_long CL_ALIGNED(128) s[16];
  777. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  778. __extension__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
  779. __extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
  780. __extension__ struct{ cl_long8 lo, hi; };
  781. #endif
  782. #if defined( __CL_LONG2__)
  783. __cl_long2 v2[8];
  784. #endif
  785. #if defined( __CL_LONG4__)
  786. __cl_long4 v4[4];
  787. #endif
  788. #if defined( __CL_LONG8__ )
  789. __cl_long8 v8[2];
  790. #endif
  791. #if defined( __CL_LONG16__ )
  792. __cl_long16 v16;
  793. #endif
  794. }cl_long16;
  795. /* ---- cl_ulongn ---- */
  796. typedef union
  797. {
  798. cl_ulong CL_ALIGNED(16) s[2];
  799. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  800. __extension__ struct{ cl_ulong x, y; };
  801. __extension__ struct{ cl_ulong s0, s1; };
  802. __extension__ struct{ cl_ulong lo, hi; };
  803. #endif
  804. #if defined( __CL_ULONG2__)
  805. __cl_ulong2 v2;
  806. #endif
  807. }cl_ulong2;
  808. typedef union
  809. {
  810. cl_ulong CL_ALIGNED(32) s[4];
  811. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  812. __extension__ struct{ cl_ulong x, y, z, w; };
  813. __extension__ struct{ cl_ulong s0, s1, s2, s3; };
  814. __extension__ struct{ cl_ulong2 lo, hi; };
  815. #endif
  816. #if defined( __CL_ULONG2__)
  817. __cl_ulong2 v2[2];
  818. #endif
  819. #if defined( __CL_ULONG4__)
  820. __cl_ulong4 v4;
  821. #endif
  822. }cl_ulong4;
  823. typedef union
  824. {
  825. cl_ulong CL_ALIGNED(64) s[8];
  826. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  827. __extension__ struct{ cl_ulong x, y, z, w; };
  828. __extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; };
  829. __extension__ struct{ cl_ulong4 lo, hi; };
  830. #endif
  831. #if defined( __CL_ULONG2__)
  832. __cl_ulong2 v2[4];
  833. #endif
  834. #if defined( __CL_ULONG4__)
  835. __cl_ulong4 v4[2];
  836. #endif
  837. #if defined( __CL_ULONG8__ )
  838. __cl_ulong8 v8;
  839. #endif
  840. }cl_ulong8;
  841. typedef union
  842. {
  843. cl_ulong CL_ALIGNED(128) s[16];
  844. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  845. __extension__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
  846. __extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
  847. __extension__ struct{ cl_ulong8 lo, hi; };
  848. #endif
  849. #if defined( __CL_ULONG2__)
  850. __cl_ulong2 v2[8];
  851. #endif
  852. #if defined( __CL_ULONG4__)
  853. __cl_ulong4 v4[4];
  854. #endif
  855. #if defined( __CL_ULONG8__ )
  856. __cl_ulong8 v8[2];
  857. #endif
  858. #if defined( __CL_ULONG16__ )
  859. __cl_ulong16 v16;
  860. #endif
  861. }cl_ulong16;
  862. /* --- cl_floatn ---- */
  863. typedef union
  864. {
  865. cl_float CL_ALIGNED(8) s[2];
  866. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  867. __extension__ struct{ cl_float x, y; };
  868. __extension__ struct{ cl_float s0, s1; };
  869. __extension__ struct{ cl_float lo, hi; };
  870. #endif
  871. #if defined( __CL_FLOAT2__)
  872. __cl_float2 v2;
  873. #endif
  874. }cl_float2;
  875. typedef union
  876. {
  877. cl_float CL_ALIGNED(16) s[4];
  878. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  879. __extension__ struct{ cl_float x, y, z, w; };
  880. __extension__ struct{ cl_float s0, s1, s2, s3; };
  881. __extension__ struct{ cl_float2 lo, hi; };
  882. #endif
  883. #if defined( __CL_FLOAT2__)
  884. __cl_float2 v2[2];
  885. #endif
  886. #if defined( __CL_FLOAT4__)
  887. __cl_float4 v4;
  888. #endif
  889. }cl_float4;
  890. typedef union
  891. {
  892. cl_float CL_ALIGNED(32) s[8];
  893. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  894. __extension__ struct{ cl_float x, y, z, w; };
  895. __extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; };
  896. __extension__ struct{ cl_float4 lo, hi; };
  897. #endif
  898. #if defined( __CL_FLOAT2__)
  899. __cl_float2 v2[4];
  900. #endif
  901. #if defined( __CL_FLOAT4__)
  902. __cl_float4 v4[2];
  903. #endif
  904. #if defined( __CL_FLOAT8__ )
  905. __cl_float8 v8;
  906. #endif
  907. }cl_float8;
  908. typedef union
  909. {
  910. cl_float CL_ALIGNED(64) s[16];
  911. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  912. __extension__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
  913. __extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
  914. __extension__ struct{ cl_float8 lo, hi; };
  915. #endif
  916. #if defined( __CL_FLOAT2__)
  917. __cl_float2 v2[8];
  918. #endif
  919. #if defined( __CL_FLOAT4__)
  920. __cl_float4 v4[4];
  921. #endif
  922. #if defined( __CL_FLOAT8__ )
  923. __cl_float8 v8[2];
  924. #endif
  925. #if defined( __CL_FLOAT16__ )
  926. __cl_float16 v16;
  927. #endif
  928. }cl_float16;
  929. /* --- cl_doublen ---- */
  930. typedef union
  931. {
  932. cl_double CL_ALIGNED(16) s[2];
  933. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  934. __extension__ struct{ cl_double x, y; };
  935. __extension__ struct{ cl_double s0, s1; };
  936. __extension__ struct{ cl_double lo, hi; };
  937. #endif
  938. #if defined( __CL_DOUBLE2__)
  939. __cl_double2 v2;
  940. #endif
  941. }cl_double2;
  942. typedef union
  943. {
  944. cl_double CL_ALIGNED(32) s[4];
  945. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  946. __extension__ struct{ cl_double x, y, z, w; };
  947. __extension__ struct{ cl_double s0, s1, s2, s3; };
  948. __extension__ struct{ cl_double2 lo, hi; };
  949. #endif
  950. #if defined( __CL_DOUBLE2__)
  951. __cl_double2 v2[2];
  952. #endif
  953. #if defined( __CL_DOUBLE4__)
  954. __cl_double4 v4;
  955. #endif
  956. }cl_double4;
  957. typedef union
  958. {
  959. cl_double CL_ALIGNED(64) s[8];
  960. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  961. __extension__ struct{ cl_double x, y, z, w; };
  962. __extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; };
  963. __extension__ struct{ cl_double4 lo, hi; };
  964. #endif
  965. #if defined( __CL_DOUBLE2__)
  966. __cl_double2 v2[4];
  967. #endif
  968. #if defined( __CL_DOUBLE4__)
  969. __cl_double4 v4[2];
  970. #endif
  971. #if defined( __CL_DOUBLE8__ )
  972. __cl_double8 v8;
  973. #endif
  974. }cl_double8;
  975. typedef union
  976. {
  977. cl_double CL_ALIGNED(128) s[16];
  978. #if (defined( __GNUC__) || defined( __IBMC__ )) && ! defined( __STRICT_ANSI__ )
  979. __extension__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
  980. __extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
  981. __extension__ struct{ cl_double8 lo, hi; };
  982. #endif
  983. #if defined( __CL_DOUBLE2__)
  984. __cl_double2 v2[8];
  985. #endif
  986. #if defined( __CL_DOUBLE4__)
  987. __cl_double4 v4[4];
  988. #endif
  989. #if defined( __CL_DOUBLE8__ )
  990. __cl_double8 v8[2];
  991. #endif
  992. #if defined( __CL_DOUBLE16__ )
  993. __cl_double16 v16;
  994. #endif
  995. }cl_double16;
  996. #ifdef __cplusplus
  997. }
  998. #endif
  999. #endif /* __CL_PLATFORM_H */