Path: blob/master/3rdparty/include/opencl/1.2/CL/cl_platform.h
16348 views
/**********************************************************************************1* Copyright (c) 2008-2012 The Khronos Group Inc.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and/or associated documentation files (the5* "Materials"), to deal in the Materials without restriction, including6* without limitation the rights to use, copy, modify, merge, publish,7* distribute, sublicense, and/or sell copies of the Materials, and to8* permit persons to whom the Materials are furnished to do so, subject to9* the following conditions:10*11* The above copyright notice and this permission notice shall be included12* in all copies or substantial portions of the Materials.13*14* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,15* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF16* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.17* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY18* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,19* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE20* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.21**********************************************************************************/2223/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */2425#ifndef __CL_PLATFORM_H26#define __CL_PLATFORM_H2728#ifdef __APPLE__29/* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */30#include <AvailabilityMacros.h>31#endif3233#ifdef __cplusplus34extern "C" {35#endif3637#if defined(_WIN32)38#define CL_API_ENTRY39#define CL_API_CALL __stdcall40#define CL_CALLBACK __stdcall41#else42#define CL_API_ENTRY43#define CL_API_CALL44#define CL_CALLBACK45#endif4647#ifdef __APPLE__48#define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))49#define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER50#define CL_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER51#define CL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER52#define GCL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER53#define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER54#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_75556#ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER57#define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER58#define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER59#define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER60#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED61#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_862#else63#warning This path should never happen outside of internal operating system development. AvailabilityMacros do not function correctly here!64#define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER65#define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER66#define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER67#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER68#endif69#else70#define CL_EXTENSION_WEAK_LINK71#define CL_API_SUFFIX__VERSION_1_072#define CL_EXT_SUFFIX__VERSION_1_073#define CL_API_SUFFIX__VERSION_1_174#define CL_EXT_SUFFIX__VERSION_1_175#define CL_API_SUFFIX__VERSION_1_276#define CL_EXT_SUFFIX__VERSION_1_27778#ifdef __GNUC__79#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS80#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED81#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED82#else83#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED __attribute__((deprecated))84#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED85#endif8687#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS88#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED89#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED90#else91#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated))92#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED93#endif94#elif defined(_WIN32)95#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS96#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED97#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED98#else99#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED100#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED __declspec(deprecated)101#endif102103#ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS104#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED105#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED106#else107#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED108#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated)109#endif110#else111#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED112#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED113114#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED115#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED116#endif117#endif118119#if (defined (_WIN32) && defined(_MSC_VER))120121/* scalar types */122typedef signed __int8 cl_char;123typedef unsigned __int8 cl_uchar;124typedef signed __int16 cl_short;125typedef unsigned __int16 cl_ushort;126typedef signed __int32 cl_int;127typedef unsigned __int32 cl_uint;128typedef signed __int64 cl_long;129typedef unsigned __int64 cl_ulong;130131typedef unsigned __int16 cl_half;132typedef float cl_float;133typedef double cl_double;134135/* Macro names and corresponding values defined by OpenCL */136#define CL_CHAR_BIT 8137#define CL_SCHAR_MAX 127138#define CL_SCHAR_MIN (-127-1)139#define CL_CHAR_MAX CL_SCHAR_MAX140#define CL_CHAR_MIN CL_SCHAR_MIN141#define CL_UCHAR_MAX 255142#define CL_SHRT_MAX 32767143#define CL_SHRT_MIN (-32767-1)144#define CL_USHRT_MAX 65535145#define CL_INT_MAX 2147483647146#define CL_INT_MIN (-2147483647-1)147#define CL_UINT_MAX 0xffffffffU148#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)149#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)150#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)151152#define CL_FLT_DIG 6153#define CL_FLT_MANT_DIG 24154#define CL_FLT_MAX_10_EXP +38155#define CL_FLT_MAX_EXP +128156#define CL_FLT_MIN_10_EXP -37157#define CL_FLT_MIN_EXP -125158#define CL_FLT_RADIX 2159#define CL_FLT_MAX 340282346638528859811704183484516925440.0f160#define CL_FLT_MIN 1.175494350822287507969e-38f161#define CL_FLT_EPSILON 0x1.0p-23f162163#define CL_DBL_DIG 15164#define CL_DBL_MANT_DIG 53165#define CL_DBL_MAX_10_EXP +308166#define CL_DBL_MAX_EXP +1024167#define CL_DBL_MIN_10_EXP -307168#define CL_DBL_MIN_EXP -1021169#define CL_DBL_RADIX 2170#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0171#define CL_DBL_MIN 2.225073858507201383090e-308172#define CL_DBL_EPSILON 2.220446049250313080847e-16173174#define CL_M_E 2.718281828459045090796175#define CL_M_LOG2E 1.442695040888963387005176#define CL_M_LOG10E 0.434294481903251816668177#define CL_M_LN2 0.693147180559945286227178#define CL_M_LN10 2.302585092994045901094179#define CL_M_PI 3.141592653589793115998180#define CL_M_PI_2 1.570796326794896557999181#define CL_M_PI_4 0.785398163397448278999182#define CL_M_1_PI 0.318309886183790691216183#define CL_M_2_PI 0.636619772367581382433184#define CL_M_2_SQRTPI 1.128379167095512558561185#define CL_M_SQRT2 1.414213562373095145475186#define CL_M_SQRT1_2 0.707106781186547572737187188#define CL_M_E_F 2.71828174591064f189#define CL_M_LOG2E_F 1.44269502162933f190#define CL_M_LOG10E_F 0.43429449200630f191#define CL_M_LN2_F 0.69314718246460f192#define CL_M_LN10_F 2.30258512496948f193#define CL_M_PI_F 3.14159274101257f194#define CL_M_PI_2_F 1.57079637050629f195#define CL_M_PI_4_F 0.78539818525314f196#define CL_M_1_PI_F 0.31830987334251f197#define CL_M_2_PI_F 0.63661974668503f198#define CL_M_2_SQRTPI_F 1.12837922573090f199#define CL_M_SQRT2_F 1.41421353816986f200#define CL_M_SQRT1_2_F 0.70710676908493f201202#define CL_NAN (CL_INFINITY - CL_INFINITY)203#define CL_HUGE_VALF ((cl_float) 1e50)204#define CL_HUGE_VAL ((cl_double) 1e500)205#define CL_MAXFLOAT CL_FLT_MAX206#define CL_INFINITY CL_HUGE_VALF207208#else209210#include <stdint.h>211212/* scalar types */213typedef int8_t cl_char;214typedef uint8_t cl_uchar;215typedef int16_t cl_short __attribute__((aligned(2)));216typedef uint16_t cl_ushort __attribute__((aligned(2)));217typedef int32_t cl_int __attribute__((aligned(4)));218typedef uint32_t cl_uint __attribute__((aligned(4)));219typedef int64_t cl_long __attribute__((aligned(8)));220typedef uint64_t cl_ulong __attribute__((aligned(8)));221222typedef uint16_t cl_half __attribute__((aligned(2)));223typedef float cl_float __attribute__((aligned(4)));224typedef double cl_double __attribute__((aligned(8)));225226/* Macro names and corresponding values defined by OpenCL */227#define CL_CHAR_BIT 8228#define CL_SCHAR_MAX 127229#define CL_SCHAR_MIN (-127-1)230#define CL_CHAR_MAX CL_SCHAR_MAX231#define CL_CHAR_MIN CL_SCHAR_MIN232#define CL_UCHAR_MAX 255233#define CL_SHRT_MAX 32767234#define CL_SHRT_MIN (-32767-1)235#define CL_USHRT_MAX 65535236#define CL_INT_MAX 2147483647237#define CL_INT_MIN (-2147483647-1)238#define CL_UINT_MAX 0xffffffffU239#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)240#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)241#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)242243#define CL_FLT_DIG 6244#define CL_FLT_MANT_DIG 24245#define CL_FLT_MAX_10_EXP +38246#define CL_FLT_MAX_EXP +128247#define CL_FLT_MIN_10_EXP -37248#define CL_FLT_MIN_EXP -125249#define CL_FLT_RADIX 2250#define CL_FLT_MAX 0x1.fffffep127f251#define CL_FLT_MIN 0x1.0p-126f252#define CL_FLT_EPSILON 0x1.0p-23f253254#define CL_DBL_DIG 15255#define CL_DBL_MANT_DIG 53256#define CL_DBL_MAX_10_EXP +308257#define CL_DBL_MAX_EXP +1024258#define CL_DBL_MIN_10_EXP -307259#define CL_DBL_MIN_EXP -1021260#define CL_DBL_RADIX 2261#define CL_DBL_MAX 0x1.fffffffffffffp1023262#define CL_DBL_MIN 0x1.0p-1022263#define CL_DBL_EPSILON 0x1.0p-52264265#define CL_M_E 2.718281828459045090796266#define CL_M_LOG2E 1.442695040888963387005267#define CL_M_LOG10E 0.434294481903251816668268#define CL_M_LN2 0.693147180559945286227269#define CL_M_LN10 2.302585092994045901094270#define CL_M_PI 3.141592653589793115998271#define CL_M_PI_2 1.570796326794896557999272#define CL_M_PI_4 0.785398163397448278999273#define CL_M_1_PI 0.318309886183790691216274#define CL_M_2_PI 0.636619772367581382433275#define CL_M_2_SQRTPI 1.128379167095512558561276#define CL_M_SQRT2 1.414213562373095145475277#define CL_M_SQRT1_2 0.707106781186547572737278279#define CL_M_E_F 2.71828174591064f280#define CL_M_LOG2E_F 1.44269502162933f281#define CL_M_LOG10E_F 0.43429449200630f282#define CL_M_LN2_F 0.69314718246460f283#define CL_M_LN10_F 2.30258512496948f284#define CL_M_PI_F 3.14159274101257f285#define CL_M_PI_2_F 1.57079637050629f286#define CL_M_PI_4_F 0.78539818525314f287#define CL_M_1_PI_F 0.31830987334251f288#define CL_M_2_PI_F 0.63661974668503f289#define CL_M_2_SQRTPI_F 1.12837922573090f290#define CL_M_SQRT2_F 1.41421353816986f291#define CL_M_SQRT1_2_F 0.70710676908493f292293#if defined( __GNUC__ )294#define CL_HUGE_VALF __builtin_huge_valf()295#define CL_HUGE_VAL __builtin_huge_val()296#define CL_NAN __builtin_nanf( "" )297#else298#define CL_HUGE_VALF ((cl_float) 1e50)299#define CL_HUGE_VAL ((cl_double) 1e500)300float nanf( const char * );301#define CL_NAN nanf( "" )302#endif303#define CL_MAXFLOAT CL_FLT_MAX304#define CL_INFINITY CL_HUGE_VALF305306#endif307308#include <stddef.h>309310/* Mirror types to GL types. Mirror types allow us to avoid deciding which 87s to load based on whether we are using GL or GLES here. */311typedef unsigned int cl_GLuint;312typedef int cl_GLint;313typedef unsigned int cl_GLenum;314315/*316* Vector types317*318* Note: OpenCL requires that all types be naturally aligned.319* This means that vector types must be naturally aligned.320* For example, a vector of four floats must be aligned to321* a 16 byte boundary (calculated as 4 * the natural 4-byte322* alignment of the float). The alignment qualifiers here323* will only function properly if your compiler supports them324* and if you don't actively work to defeat them. For example,325* in order for a cl_float4 to be 16 byte aligned in a struct,326* the start of the struct must itself be 16-byte aligned.327*328* Maintaining proper alignment is the user's responsibility.329*/330331/* Define basic vector types */332#if defined( __VEC__ )333#include <altivec.h> /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */334typedef __vector unsigned char __cl_uchar16;335typedef __vector signed char __cl_char16;336typedef __vector unsigned short __cl_ushort8;337typedef __vector signed short __cl_short8;338typedef __vector unsigned int __cl_uint4;339typedef __vector signed int __cl_int4;340typedef __vector float __cl_float4;341#define __CL_UCHAR16__ 1342#define __CL_CHAR16__ 1343#define __CL_USHORT8__ 1344#define __CL_SHORT8__ 1345#define __CL_UINT4__ 1346#define __CL_INT4__ 1347#define __CL_FLOAT4__ 1348#endif349350#if defined( __SSE__ )351#if defined( __MINGW64__ )352#include <intrin.h>353#else354#include <xmmintrin.h>355#endif356#if defined( __GNUC__ )357typedef float __cl_float4 __attribute__((vector_size(16)));358#else359typedef __m128 __cl_float4;360#endif361#define __CL_FLOAT4__ 1362#endif363364#if defined( __SSE2__ )365#if defined( __MINGW64__ )366#include <intrin.h>367#else368#include <emmintrin.h>369#endif370#if defined( __GNUC__ )371typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16)));372typedef cl_char __cl_char16 __attribute__((vector_size(16)));373typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16)));374typedef cl_short __cl_short8 __attribute__((vector_size(16)));375typedef cl_uint __cl_uint4 __attribute__((vector_size(16)));376typedef cl_int __cl_int4 __attribute__((vector_size(16)));377typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16)));378typedef cl_long __cl_long2 __attribute__((vector_size(16)));379typedef cl_double __cl_double2 __attribute__((vector_size(16)));380#else381typedef __m128i __cl_uchar16;382typedef __m128i __cl_char16;383typedef __m128i __cl_ushort8;384typedef __m128i __cl_short8;385typedef __m128i __cl_uint4;386typedef __m128i __cl_int4;387typedef __m128i __cl_ulong2;388typedef __m128i __cl_long2;389typedef __m128d __cl_double2;390#endif391#define __CL_UCHAR16__ 1392#define __CL_CHAR16__ 1393#define __CL_USHORT8__ 1394#define __CL_SHORT8__ 1395#define __CL_INT4__ 1396#define __CL_UINT4__ 1397#define __CL_ULONG2__ 1398#define __CL_LONG2__ 1399#define __CL_DOUBLE2__ 1400#endif401402#if defined( __MMX__ )403#include <mmintrin.h>404#if defined( __GNUC__ )405typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8)));406typedef cl_char __cl_char8 __attribute__((vector_size(8)));407typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8)));408typedef cl_short __cl_short4 __attribute__((vector_size(8)));409typedef cl_uint __cl_uint2 __attribute__((vector_size(8)));410typedef cl_int __cl_int2 __attribute__((vector_size(8)));411typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8)));412typedef cl_long __cl_long1 __attribute__((vector_size(8)));413typedef cl_float __cl_float2 __attribute__((vector_size(8)));414#else415typedef __m64 __cl_uchar8;416typedef __m64 __cl_char8;417typedef __m64 __cl_ushort4;418typedef __m64 __cl_short4;419typedef __m64 __cl_uint2;420typedef __m64 __cl_int2;421typedef __m64 __cl_ulong1;422typedef __m64 __cl_long1;423typedef __m64 __cl_float2;424#endif425#define __CL_UCHAR8__ 1426#define __CL_CHAR8__ 1427#define __CL_USHORT4__ 1428#define __CL_SHORT4__ 1429#define __CL_INT2__ 1430#define __CL_UINT2__ 1431#define __CL_ULONG1__ 1432#define __CL_LONG1__ 1433#define __CL_FLOAT2__ 1434#endif435436#if defined( __AVX__ )437#if defined( __MINGW64__ )438#include <intrin.h>439#else440#include <immintrin.h>441#endif442#if defined( __GNUC__ )443typedef cl_float __cl_float8 __attribute__((vector_size(32)));444typedef cl_double __cl_double4 __attribute__((vector_size(32)));445#else446typedef __m256 __cl_float8;447typedef __m256d __cl_double4;448#endif449#define __CL_FLOAT8__ 1450#define __CL_DOUBLE4__ 1451#endif452453/* Define alignment keys */454#if defined( __GNUC__ )455#define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))456#elif defined( _WIN32) && defined(_MSC_VER)457/* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */458/* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */459/* #include <crtdefs.h> */460/* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */461#define CL_ALIGNED(_x)462#else463#warning Need to implement some method to align data here464#define CL_ALIGNED(_x)465#endif466467/* Indicate whether .xyzw, .s0123 and .hi.lo are supported */468#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )469/* .xyzw and .s0123...{f|F} are supported */470#define CL_HAS_NAMED_VECTOR_FIELDS 1471/* .hi and .lo are supported */472#define CL_HAS_HI_LO_VECTOR_FIELDS 1473#endif474475/* Define cl_vector types */476477/* ---- cl_charn ---- */478typedef union479{480cl_char CL_ALIGNED(2) s[2];481#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )482__extension__ struct{ cl_char x, y; };483__extension__ struct{ cl_char s0, s1; };484__extension__ struct{ cl_char lo, hi; };485#endif486#if defined( __CL_CHAR2__)487__cl_char2 v2;488#endif489}cl_char2;490491typedef union492{493cl_char CL_ALIGNED(4) s[4];494#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )495__extension__ struct{ cl_char x, y, z, w; };496__extension__ struct{ cl_char s0, s1, s2, s3; };497__extension__ struct{ cl_char2 lo, hi; };498#endif499#if defined( __CL_CHAR2__)500__cl_char2 v2[2];501#endif502#if defined( __CL_CHAR4__)503__cl_char4 v4;504#endif505}cl_char4;506507/* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */508typedef cl_char4 cl_char3;509510typedef union511{512cl_char CL_ALIGNED(8) s[8];513#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )514__extension__ struct{ cl_char x, y, z, w; };515__extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; };516__extension__ struct{ cl_char4 lo, hi; };517#endif518#if defined( __CL_CHAR2__)519__cl_char2 v2[4];520#endif521#if defined( __CL_CHAR4__)522__cl_char4 v4[2];523#endif524#if defined( __CL_CHAR8__ )525__cl_char8 v8;526#endif527}cl_char8;528529typedef union530{531cl_char CL_ALIGNED(16) s[16];532#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )533__extension__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };534__extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };535__extension__ struct{ cl_char8 lo, hi; };536#endif537#if defined( __CL_CHAR2__)538__cl_char2 v2[8];539#endif540#if defined( __CL_CHAR4__)541__cl_char4 v4[4];542#endif543#if defined( __CL_CHAR8__ )544__cl_char8 v8[2];545#endif546#if defined( __CL_CHAR16__ )547__cl_char16 v16;548#endif549}cl_char16;550551552/* ---- cl_ucharn ---- */553typedef union554{555cl_uchar CL_ALIGNED(2) s[2];556#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )557__extension__ struct{ cl_uchar x, y; };558__extension__ struct{ cl_uchar s0, s1; };559__extension__ struct{ cl_uchar lo, hi; };560#endif561#if defined( __cl_uchar2__)562__cl_uchar2 v2;563#endif564}cl_uchar2;565566typedef union567{568cl_uchar CL_ALIGNED(4) s[4];569#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )570__extension__ struct{ cl_uchar x, y, z, w; };571__extension__ struct{ cl_uchar s0, s1, s2, s3; };572__extension__ struct{ cl_uchar2 lo, hi; };573#endif574#if defined( __CL_UCHAR2__)575__cl_uchar2 v2[2];576#endif577#if defined( __CL_UCHAR4__)578__cl_uchar4 v4;579#endif580}cl_uchar4;581582/* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */583typedef cl_uchar4 cl_uchar3;584585typedef union586{587cl_uchar CL_ALIGNED(8) s[8];588#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )589__extension__ struct{ cl_uchar x, y, z, w; };590__extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; };591__extension__ struct{ cl_uchar4 lo, hi; };592#endif593#if defined( __CL_UCHAR2__)594__cl_uchar2 v2[4];595#endif596#if defined( __CL_UCHAR4__)597__cl_uchar4 v4[2];598#endif599#if defined( __CL_UCHAR8__ )600__cl_uchar8 v8;601#endif602}cl_uchar8;603604typedef union605{606cl_uchar CL_ALIGNED(16) s[16];607#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )608__extension__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };609__extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };610__extension__ struct{ cl_uchar8 lo, hi; };611#endif612#if defined( __CL_UCHAR2__)613__cl_uchar2 v2[8];614#endif615#if defined( __CL_UCHAR4__)616__cl_uchar4 v4[4];617#endif618#if defined( __CL_UCHAR8__ )619__cl_uchar8 v8[2];620#endif621#if defined( __CL_UCHAR16__ )622__cl_uchar16 v16;623#endif624}cl_uchar16;625626627/* ---- cl_shortn ---- */628typedef union629{630cl_short CL_ALIGNED(4) s[2];631#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )632__extension__ struct{ cl_short x, y; };633__extension__ struct{ cl_short s0, s1; };634__extension__ struct{ cl_short lo, hi; };635#endif636#if defined( __CL_SHORT2__)637__cl_short2 v2;638#endif639}cl_short2;640641typedef union642{643cl_short CL_ALIGNED(8) s[4];644#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )645__extension__ struct{ cl_short x, y, z, w; };646__extension__ struct{ cl_short s0, s1, s2, s3; };647__extension__ struct{ cl_short2 lo, hi; };648#endif649#if defined( __CL_SHORT2__)650__cl_short2 v2[2];651#endif652#if defined( __CL_SHORT4__)653__cl_short4 v4;654#endif655}cl_short4;656657/* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */658typedef cl_short4 cl_short3;659660typedef union661{662cl_short CL_ALIGNED(16) s[8];663#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )664__extension__ struct{ cl_short x, y, z, w; };665__extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; };666__extension__ struct{ cl_short4 lo, hi; };667#endif668#if defined( __CL_SHORT2__)669__cl_short2 v2[4];670#endif671#if defined( __CL_SHORT4__)672__cl_short4 v4[2];673#endif674#if defined( __CL_SHORT8__ )675__cl_short8 v8;676#endif677}cl_short8;678679typedef union680{681cl_short CL_ALIGNED(32) s[16];682#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )683__extension__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };684__extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };685__extension__ struct{ cl_short8 lo, hi; };686#endif687#if defined( __CL_SHORT2__)688__cl_short2 v2[8];689#endif690#if defined( __CL_SHORT4__)691__cl_short4 v4[4];692#endif693#if defined( __CL_SHORT8__ )694__cl_short8 v8[2];695#endif696#if defined( __CL_SHORT16__ )697__cl_short16 v16;698#endif699}cl_short16;700701702/* ---- cl_ushortn ---- */703typedef union704{705cl_ushort CL_ALIGNED(4) s[2];706#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )707__extension__ struct{ cl_ushort x, y; };708__extension__ struct{ cl_ushort s0, s1; };709__extension__ struct{ cl_ushort lo, hi; };710#endif711#if defined( __CL_USHORT2__)712__cl_ushort2 v2;713#endif714}cl_ushort2;715716typedef union717{718cl_ushort CL_ALIGNED(8) s[4];719#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )720__extension__ struct{ cl_ushort x, y, z, w; };721__extension__ struct{ cl_ushort s0, s1, s2, s3; };722__extension__ struct{ cl_ushort2 lo, hi; };723#endif724#if defined( __CL_USHORT2__)725__cl_ushort2 v2[2];726#endif727#if defined( __CL_USHORT4__)728__cl_ushort4 v4;729#endif730}cl_ushort4;731732/* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */733typedef cl_ushort4 cl_ushort3;734735typedef union736{737cl_ushort CL_ALIGNED(16) s[8];738#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )739__extension__ struct{ cl_ushort x, y, z, w; };740__extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; };741__extension__ struct{ cl_ushort4 lo, hi; };742#endif743#if defined( __CL_USHORT2__)744__cl_ushort2 v2[4];745#endif746#if defined( __CL_USHORT4__)747__cl_ushort4 v4[2];748#endif749#if defined( __CL_USHORT8__ )750__cl_ushort8 v8;751#endif752}cl_ushort8;753754typedef union755{756cl_ushort CL_ALIGNED(32) s[16];757#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )758__extension__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };759__extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };760__extension__ struct{ cl_ushort8 lo, hi; };761#endif762#if defined( __CL_USHORT2__)763__cl_ushort2 v2[8];764#endif765#if defined( __CL_USHORT4__)766__cl_ushort4 v4[4];767#endif768#if defined( __CL_USHORT8__ )769__cl_ushort8 v8[2];770#endif771#if defined( __CL_USHORT16__ )772__cl_ushort16 v16;773#endif774}cl_ushort16;775776/* ---- cl_intn ---- */777typedef union778{779cl_int CL_ALIGNED(8) s[2];780#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )781__extension__ struct{ cl_int x, y; };782__extension__ struct{ cl_int s0, s1; };783__extension__ struct{ cl_int lo, hi; };784#endif785#if defined( __CL_INT2__)786__cl_int2 v2;787#endif788}cl_int2;789790typedef union791{792cl_int CL_ALIGNED(16) s[4];793#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )794__extension__ struct{ cl_int x, y, z, w; };795__extension__ struct{ cl_int s0, s1, s2, s3; };796__extension__ struct{ cl_int2 lo, hi; };797#endif798#if defined( __CL_INT2__)799__cl_int2 v2[2];800#endif801#if defined( __CL_INT4__)802__cl_int4 v4;803#endif804}cl_int4;805806/* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */807typedef cl_int4 cl_int3;808809typedef union810{811cl_int CL_ALIGNED(32) s[8];812#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )813__extension__ struct{ cl_int x, y, z, w; };814__extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; };815__extension__ struct{ cl_int4 lo, hi; };816#endif817#if defined( __CL_INT2__)818__cl_int2 v2[4];819#endif820#if defined( __CL_INT4__)821__cl_int4 v4[2];822#endif823#if defined( __CL_INT8__ )824__cl_int8 v8;825#endif826}cl_int8;827828typedef union829{830cl_int CL_ALIGNED(64) s[16];831#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )832__extension__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };833__extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };834__extension__ struct{ cl_int8 lo, hi; };835#endif836#if defined( __CL_INT2__)837__cl_int2 v2[8];838#endif839#if defined( __CL_INT4__)840__cl_int4 v4[4];841#endif842#if defined( __CL_INT8__ )843__cl_int8 v8[2];844#endif845#if defined( __CL_INT16__ )846__cl_int16 v16;847#endif848}cl_int16;849850851/* ---- cl_uintn ---- */852typedef union853{854cl_uint CL_ALIGNED(8) s[2];855#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )856__extension__ struct{ cl_uint x, y; };857__extension__ struct{ cl_uint s0, s1; };858__extension__ struct{ cl_uint lo, hi; };859#endif860#if defined( __CL_UINT2__)861__cl_uint2 v2;862#endif863}cl_uint2;864865typedef union866{867cl_uint CL_ALIGNED(16) s[4];868#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )869__extension__ struct{ cl_uint x, y, z, w; };870__extension__ struct{ cl_uint s0, s1, s2, s3; };871__extension__ struct{ cl_uint2 lo, hi; };872#endif873#if defined( __CL_UINT2__)874__cl_uint2 v2[2];875#endif876#if defined( __CL_UINT4__)877__cl_uint4 v4;878#endif879}cl_uint4;880881/* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */882typedef cl_uint4 cl_uint3;883884typedef union885{886cl_uint CL_ALIGNED(32) s[8];887#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )888__extension__ struct{ cl_uint x, y, z, w; };889__extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; };890__extension__ struct{ cl_uint4 lo, hi; };891#endif892#if defined( __CL_UINT2__)893__cl_uint2 v2[4];894#endif895#if defined( __CL_UINT4__)896__cl_uint4 v4[2];897#endif898#if defined( __CL_UINT8__ )899__cl_uint8 v8;900#endif901}cl_uint8;902903typedef union904{905cl_uint CL_ALIGNED(64) s[16];906#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )907__extension__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };908__extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };909__extension__ struct{ cl_uint8 lo, hi; };910#endif911#if defined( __CL_UINT2__)912__cl_uint2 v2[8];913#endif914#if defined( __CL_UINT4__)915__cl_uint4 v4[4];916#endif917#if defined( __CL_UINT8__ )918__cl_uint8 v8[2];919#endif920#if defined( __CL_UINT16__ )921__cl_uint16 v16;922#endif923}cl_uint16;924925/* ---- cl_longn ---- */926typedef union927{928cl_long CL_ALIGNED(16) s[2];929#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )930__extension__ struct{ cl_long x, y; };931__extension__ struct{ cl_long s0, s1; };932__extension__ struct{ cl_long lo, hi; };933#endif934#if defined( __CL_LONG2__)935__cl_long2 v2;936#endif937}cl_long2;938939typedef union940{941cl_long CL_ALIGNED(32) s[4];942#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )943__extension__ struct{ cl_long x, y, z, w; };944__extension__ struct{ cl_long s0, s1, s2, s3; };945__extension__ struct{ cl_long2 lo, hi; };946#endif947#if defined( __CL_LONG2__)948__cl_long2 v2[2];949#endif950#if defined( __CL_LONG4__)951__cl_long4 v4;952#endif953}cl_long4;954955/* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */956typedef cl_long4 cl_long3;957958typedef union959{960cl_long CL_ALIGNED(64) s[8];961#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )962__extension__ struct{ cl_long x, y, z, w; };963__extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; };964__extension__ struct{ cl_long4 lo, hi; };965#endif966#if defined( __CL_LONG2__)967__cl_long2 v2[4];968#endif969#if defined( __CL_LONG4__)970__cl_long4 v4[2];971#endif972#if defined( __CL_LONG8__ )973__cl_long8 v8;974#endif975}cl_long8;976977typedef union978{979cl_long CL_ALIGNED(128) s[16];980#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )981__extension__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };982__extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };983__extension__ struct{ cl_long8 lo, hi; };984#endif985#if defined( __CL_LONG2__)986__cl_long2 v2[8];987#endif988#if defined( __CL_LONG4__)989__cl_long4 v4[4];990#endif991#if defined( __CL_LONG8__ )992__cl_long8 v8[2];993#endif994#if defined( __CL_LONG16__ )995__cl_long16 v16;996#endif997}cl_long16;9989991000/* ---- cl_ulongn ---- */1001typedef union1002{1003cl_ulong CL_ALIGNED(16) s[2];1004#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1005__extension__ struct{ cl_ulong x, y; };1006__extension__ struct{ cl_ulong s0, s1; };1007__extension__ struct{ cl_ulong lo, hi; };1008#endif1009#if defined( __CL_ULONG2__)1010__cl_ulong2 v2;1011#endif1012}cl_ulong2;10131014typedef union1015{1016cl_ulong CL_ALIGNED(32) s[4];1017#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1018__extension__ struct{ cl_ulong x, y, z, w; };1019__extension__ struct{ cl_ulong s0, s1, s2, s3; };1020__extension__ struct{ cl_ulong2 lo, hi; };1021#endif1022#if defined( __CL_ULONG2__)1023__cl_ulong2 v2[2];1024#endif1025#if defined( __CL_ULONG4__)1026__cl_ulong4 v4;1027#endif1028}cl_ulong4;10291030/* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */1031typedef cl_ulong4 cl_ulong3;10321033typedef union1034{1035cl_ulong CL_ALIGNED(64) s[8];1036#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1037__extension__ struct{ cl_ulong x, y, z, w; };1038__extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; };1039__extension__ struct{ cl_ulong4 lo, hi; };1040#endif1041#if defined( __CL_ULONG2__)1042__cl_ulong2 v2[4];1043#endif1044#if defined( __CL_ULONG4__)1045__cl_ulong4 v4[2];1046#endif1047#if defined( __CL_ULONG8__ )1048__cl_ulong8 v8;1049#endif1050}cl_ulong8;10511052typedef union1053{1054cl_ulong CL_ALIGNED(128) s[16];1055#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1056__extension__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };1057__extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };1058__extension__ struct{ cl_ulong8 lo, hi; };1059#endif1060#if defined( __CL_ULONG2__)1061__cl_ulong2 v2[8];1062#endif1063#if defined( __CL_ULONG4__)1064__cl_ulong4 v4[4];1065#endif1066#if defined( __CL_ULONG8__ )1067__cl_ulong8 v8[2];1068#endif1069#if defined( __CL_ULONG16__ )1070__cl_ulong16 v16;1071#endif1072}cl_ulong16;107310741075/* --- cl_floatn ---- */10761077typedef union1078{1079cl_float CL_ALIGNED(8) s[2];1080#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1081__extension__ struct{ cl_float x, y; };1082__extension__ struct{ cl_float s0, s1; };1083__extension__ struct{ cl_float lo, hi; };1084#endif1085#if defined( __CL_FLOAT2__)1086__cl_float2 v2;1087#endif1088}cl_float2;10891090typedef union1091{1092cl_float CL_ALIGNED(16) s[4];1093#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1094__extension__ struct{ cl_float x, y, z, w; };1095__extension__ struct{ cl_float s0, s1, s2, s3; };1096__extension__ struct{ cl_float2 lo, hi; };1097#endif1098#if defined( __CL_FLOAT2__)1099__cl_float2 v2[2];1100#endif1101#if defined( __CL_FLOAT4__)1102__cl_float4 v4;1103#endif1104}cl_float4;11051106/* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */1107typedef cl_float4 cl_float3;11081109typedef union1110{1111cl_float CL_ALIGNED(32) s[8];1112#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1113__extension__ struct{ cl_float x, y, z, w; };1114__extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; };1115__extension__ struct{ cl_float4 lo, hi; };1116#endif1117#if defined( __CL_FLOAT2__)1118__cl_float2 v2[4];1119#endif1120#if defined( __CL_FLOAT4__)1121__cl_float4 v4[2];1122#endif1123#if defined( __CL_FLOAT8__ )1124__cl_float8 v8;1125#endif1126}cl_float8;11271128typedef union1129{1130cl_float CL_ALIGNED(64) s[16];1131#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1132__extension__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };1133__extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };1134__extension__ struct{ cl_float8 lo, hi; };1135#endif1136#if defined( __CL_FLOAT2__)1137__cl_float2 v2[8];1138#endif1139#if defined( __CL_FLOAT4__)1140__cl_float4 v4[4];1141#endif1142#if defined( __CL_FLOAT8__ )1143__cl_float8 v8[2];1144#endif1145#if defined( __CL_FLOAT16__ )1146__cl_float16 v16;1147#endif1148}cl_float16;11491150/* --- cl_doublen ---- */11511152typedef union1153{1154cl_double CL_ALIGNED(16) s[2];1155#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1156__extension__ struct{ cl_double x, y; };1157__extension__ struct{ cl_double s0, s1; };1158__extension__ struct{ cl_double lo, hi; };1159#endif1160#if defined( __CL_DOUBLE2__)1161__cl_double2 v2;1162#endif1163}cl_double2;11641165typedef union1166{1167cl_double CL_ALIGNED(32) s[4];1168#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1169__extension__ struct{ cl_double x, y, z, w; };1170__extension__ struct{ cl_double s0, s1, s2, s3; };1171__extension__ struct{ cl_double2 lo, hi; };1172#endif1173#if defined( __CL_DOUBLE2__)1174__cl_double2 v2[2];1175#endif1176#if defined( __CL_DOUBLE4__)1177__cl_double4 v4;1178#endif1179}cl_double4;11801181/* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */1182typedef cl_double4 cl_double3;11831184typedef union1185{1186cl_double CL_ALIGNED(64) s[8];1187#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1188__extension__ struct{ cl_double x, y, z, w; };1189__extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; };1190__extension__ struct{ cl_double4 lo, hi; };1191#endif1192#if defined( __CL_DOUBLE2__)1193__cl_double2 v2[4];1194#endif1195#if defined( __CL_DOUBLE4__)1196__cl_double4 v4[2];1197#endif1198#if defined( __CL_DOUBLE8__ )1199__cl_double8 v8;1200#endif1201}cl_double8;12021203typedef union1204{1205cl_double CL_ALIGNED(128) s[16];1206#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )1207__extension__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };1208__extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };1209__extension__ struct{ cl_double8 lo, hi; };1210#endif1211#if defined( __CL_DOUBLE2__)1212__cl_double2 v2[8];1213#endif1214#if defined( __CL_DOUBLE4__)1215__cl_double4 v4[4];1216#endif1217#if defined( __CL_DOUBLE8__ )1218__cl_double8 v8[2];1219#endif1220#if defined( __CL_DOUBLE16__ )1221__cl_double16 v16;1222#endif1223}cl_double16;12241225/* Macro to facilitate debugging1226* Usage:1227* Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source.1228* The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \"1229* Each line thereafter of OpenCL C source must end with: \n\1230* The last line ends in ";1231*1232* Example:1233*1234* const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\1235* kernel void foo( int a, float * b ) \n\1236* { \n\1237* // my comment \n\1238* *b[ get_global_id(0)] = a; \n\1239* } \n\1240* ";1241*1242* This should correctly set up the line, (column) and file information for your source1243* string so you can do source level debugging.1244*/1245#define __CL_STRINGIFY( _x ) # _x1246#define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x )1247#define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n"12481249#ifdef __cplusplus1250}1251#endif12521253#endif /* __CL_PLATFORM_H */125412551256