Spaces:
Build error
Build error
/******************************************************************************* | |
* Copyright (c) 2008-2020 The Khronos Group Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
******************************************************************************/ | |
extern "C" { | |
/* | |
* Deprecation flags refer to the last version of the header in which the | |
* feature was not deprecated. | |
* | |
* E.g. VERSION_1_1_DEPRECATED means the feature is present in 1.1 without | |
* deprecation but is deprecated in versions later than 1.1. | |
*/ | |
/* intptr_t is used in cl.h and provided by stddef.h in Visual C++, but not in clang */ | |
/* stdint.h was missing before Visual Studio 2010, include it for later versions and for clang */ | |
/* scalar types */ | |
typedef signed __int8 cl_char; | |
typedef unsigned __int8 cl_uchar; | |
typedef signed __int16 cl_short; | |
typedef unsigned __int16 cl_ushort; | |
typedef signed __int32 cl_int; | |
typedef unsigned __int32 cl_uint; | |
typedef signed __int64 cl_long; | |
typedef unsigned __int64 cl_ulong; | |
typedef unsigned __int16 cl_half; | |
typedef float cl_float; | |
typedef double cl_double; | |
/* Macro names and corresponding values defined by OpenCL */ | |
/* scalar types */ | |
typedef int8_t cl_char; | |
typedef uint8_t cl_uchar; | |
typedef int16_t cl_short; | |
typedef uint16_t cl_ushort; | |
typedef int32_t cl_int; | |
typedef uint32_t cl_uint; | |
typedef int64_t cl_long; | |
typedef uint64_t cl_ulong; | |
typedef uint16_t cl_half; | |
typedef float cl_float; | |
typedef double cl_double; | |
/* Macro names and corresponding values defined by OpenCL */ | |
float nanf( const char * ); | |
/* 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. */ | |
typedef unsigned int cl_GLuint; | |
typedef int cl_GLint; | |
typedef unsigned int cl_GLenum; | |
/* | |
* Vector types | |
* | |
* Note: OpenCL requires that all types be naturally aligned. | |
* This means that vector types must be naturally aligned. | |
* For example, a vector of four floats must be aligned to | |
* a 16 byte boundary (calculated as 4 * the natural 4-byte | |
* alignment of the float). The alignment qualifiers here | |
* will only function properly if your compiler supports them | |
* and if you don't actively work to defeat them. For example, | |
* in order for a cl_float4 to be 16 byte aligned in a struct, | |
* the start of the struct must itself be 16-byte aligned. | |
* | |
* Maintaining proper alignment is the user's responsibility. | |
*/ | |
/* Define basic vector types */ | |
typedef __vector unsigned char __cl_uchar16; | |
typedef __vector signed char __cl_char16; | |
typedef __vector unsigned short __cl_ushort8; | |
typedef __vector signed short __cl_short8; | |
typedef __vector unsigned int __cl_uint4; | |
typedef __vector signed int __cl_int4; | |
typedef __vector float __cl_float4; | |
typedef float __cl_float4 __attribute__((vector_size(16))); | |
typedef __m128 __cl_float4; | |
typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16))); | |
typedef cl_char __cl_char16 __attribute__((vector_size(16))); | |
typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16))); | |
typedef cl_short __cl_short8 __attribute__((vector_size(16))); | |
typedef cl_uint __cl_uint4 __attribute__((vector_size(16))); | |
typedef cl_int __cl_int4 __attribute__((vector_size(16))); | |
typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16))); | |
typedef cl_long __cl_long2 __attribute__((vector_size(16))); | |
typedef cl_double __cl_double2 __attribute__((vector_size(16))); | |
typedef __m128i __cl_uchar16; | |
typedef __m128i __cl_char16; | |
typedef __m128i __cl_ushort8; | |
typedef __m128i __cl_short8; | |
typedef __m128i __cl_uint4; | |
typedef __m128i __cl_int4; | |
typedef __m128i __cl_ulong2; | |
typedef __m128i __cl_long2; | |
typedef __m128d __cl_double2; | |
typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8))); | |
typedef cl_char __cl_char8 __attribute__((vector_size(8))); | |
typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8))); | |
typedef cl_short __cl_short4 __attribute__((vector_size(8))); | |
typedef cl_uint __cl_uint2 __attribute__((vector_size(8))); | |
typedef cl_int __cl_int2 __attribute__((vector_size(8))); | |
typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8))); | |
typedef cl_long __cl_long1 __attribute__((vector_size(8))); | |
typedef cl_float __cl_float2 __attribute__((vector_size(8))); | |
typedef __m64 __cl_uchar8; | |
typedef __m64 __cl_char8; | |
typedef __m64 __cl_ushort4; | |
typedef __m64 __cl_short4; | |
typedef __m64 __cl_uint2; | |
typedef __m64 __cl_int2; | |
typedef __m64 __cl_ulong1; | |
typedef __m64 __cl_long1; | |
typedef __m64 __cl_float2; | |
typedef cl_float __cl_float8 __attribute__((vector_size(32))); | |
typedef cl_double __cl_double4 __attribute__((vector_size(32))); | |
typedef __m256 __cl_float8; | |
typedef __m256d __cl_double4; | |
/* Define capabilities for anonymous struct members. */ | |
/* Disable warning C4201: nonstandard extension used : nameless struct/union */ | |
/* Define alignment keys */ | |
/* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */ | |
/* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */ | |
/* #include <crtdefs.h> */ | |
/* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */ | |
/* Indicate whether .xyzw, .s0123 and .hi.lo are supported */ | |
/* .xyzw and .s0123...{f|F} are supported */ | |
/* .hi and .lo are supported */ | |
/* Define cl_vector types */ | |
/* ---- cl_charn ---- */ | |
typedef union | |
{ | |
cl_char CL_ALIGNED(2) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_char x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_char s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_char lo, hi; }; | |
__cl_char2 v2; | |
}cl_char2; | |
typedef union | |
{ | |
cl_char CL_ALIGNED(4) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_char2 lo, hi; }; | |
__cl_char2 v2[2]; | |
__cl_char4 v4; | |
}cl_char4; | |
/* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */ | |
typedef cl_char4 cl_char3; | |
typedef union | |
{ | |
cl_char CL_ALIGNED(8) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_char4 lo, hi; }; | |
__cl_char2 v2[4]; | |
__cl_char4 v4[2]; | |
__cl_char8 v8; | |
}cl_char8; | |
typedef union | |
{ | |
cl_char CL_ALIGNED(16) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_char8 lo, hi; }; | |
__cl_char2 v2[8]; | |
__cl_char4 v4[4]; | |
__cl_char8 v8[2]; | |
__cl_char16 v16; | |
}cl_char16; | |
/* ---- cl_ucharn ---- */ | |
typedef union | |
{ | |
cl_uchar CL_ALIGNED(2) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_uchar x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_uchar s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_uchar lo, hi; }; | |
__cl_uchar2 v2; | |
}cl_uchar2; | |
typedef union | |
{ | |
cl_uchar CL_ALIGNED(4) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_uchar2 lo, hi; }; | |
__cl_uchar2 v2[2]; | |
__cl_uchar4 v4; | |
}cl_uchar4; | |
/* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */ | |
typedef cl_uchar4 cl_uchar3; | |
typedef union | |
{ | |
cl_uchar CL_ALIGNED(8) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_uchar4 lo, hi; }; | |
__cl_uchar2 v2[4]; | |
__cl_uchar4 v4[2]; | |
__cl_uchar8 v8; | |
}cl_uchar8; | |
typedef union | |
{ | |
cl_uchar CL_ALIGNED(16) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_uchar8 lo, hi; }; | |
__cl_uchar2 v2[8]; | |
__cl_uchar4 v4[4]; | |
__cl_uchar8 v8[2]; | |
__cl_uchar16 v16; | |
}cl_uchar16; | |
/* ---- cl_shortn ---- */ | |
typedef union | |
{ | |
cl_short CL_ALIGNED(4) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_short x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_short s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_short lo, hi; }; | |
__cl_short2 v2; | |
}cl_short2; | |
typedef union | |
{ | |
cl_short CL_ALIGNED(8) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_short2 lo, hi; }; | |
__cl_short2 v2[2]; | |
__cl_short4 v4; | |
}cl_short4; | |
/* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */ | |
typedef cl_short4 cl_short3; | |
typedef union | |
{ | |
cl_short CL_ALIGNED(16) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_short4 lo, hi; }; | |
__cl_short2 v2[4]; | |
__cl_short4 v4[2]; | |
__cl_short8 v8; | |
}cl_short8; | |
typedef union | |
{ | |
cl_short CL_ALIGNED(32) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_short8 lo, hi; }; | |
__cl_short2 v2[8]; | |
__cl_short4 v4[4]; | |
__cl_short8 v8[2]; | |
__cl_short16 v16; | |
}cl_short16; | |
/* ---- cl_ushortn ---- */ | |
typedef union | |
{ | |
cl_ushort CL_ALIGNED(4) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_ushort x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_ushort s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_ushort lo, hi; }; | |
__cl_ushort2 v2; | |
}cl_ushort2; | |
typedef union | |
{ | |
cl_ushort CL_ALIGNED(8) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_ushort2 lo, hi; }; | |
__cl_ushort2 v2[2]; | |
__cl_ushort4 v4; | |
}cl_ushort4; | |
/* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */ | |
typedef cl_ushort4 cl_ushort3; | |
typedef union | |
{ | |
cl_ushort CL_ALIGNED(16) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_ushort4 lo, hi; }; | |
__cl_ushort2 v2[4]; | |
__cl_ushort4 v4[2]; | |
__cl_ushort8 v8; | |
}cl_ushort8; | |
typedef union | |
{ | |
cl_ushort CL_ALIGNED(32) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_ushort8 lo, hi; }; | |
__cl_ushort2 v2[8]; | |
__cl_ushort4 v4[4]; | |
__cl_ushort8 v8[2]; | |
__cl_ushort16 v16; | |
}cl_ushort16; | |
/* ---- cl_halfn ---- */ | |
typedef union | |
{ | |
cl_half CL_ALIGNED(4) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_half x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_half s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_half lo, hi; }; | |
__cl_half2 v2; | |
}cl_half2; | |
typedef union | |
{ | |
cl_half CL_ALIGNED(8) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_half2 lo, hi; }; | |
__cl_half2 v2[2]; | |
__cl_half4 v4; | |
}cl_half4; | |
/* cl_half3 is identical in size, alignment and behavior to cl_half4. See section 6.1.5. */ | |
typedef cl_half4 cl_half3; | |
typedef union | |
{ | |
cl_half CL_ALIGNED(16) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_half4 lo, hi; }; | |
__cl_half2 v2[4]; | |
__cl_half4 v4[2]; | |
__cl_half8 v8; | |
}cl_half8; | |
typedef union | |
{ | |
cl_half CL_ALIGNED(32) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_half x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_half8 lo, hi; }; | |
__cl_half2 v2[8]; | |
__cl_half4 v4[4]; | |
__cl_half8 v8[2]; | |
__cl_half16 v16; | |
}cl_half16; | |
/* ---- cl_intn ---- */ | |
typedef union | |
{ | |
cl_int CL_ALIGNED(8) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_int x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_int s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_int lo, hi; }; | |
__cl_int2 v2; | |
}cl_int2; | |
typedef union | |
{ | |
cl_int CL_ALIGNED(16) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_int2 lo, hi; }; | |
__cl_int2 v2[2]; | |
__cl_int4 v4; | |
}cl_int4; | |
/* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */ | |
typedef cl_int4 cl_int3; | |
typedef union | |
{ | |
cl_int CL_ALIGNED(32) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_int4 lo, hi; }; | |
__cl_int2 v2[4]; | |
__cl_int4 v4[2]; | |
__cl_int8 v8; | |
}cl_int8; | |
typedef union | |
{ | |
cl_int CL_ALIGNED(64) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_int8 lo, hi; }; | |
__cl_int2 v2[8]; | |
__cl_int4 v4[4]; | |
__cl_int8 v8[2]; | |
__cl_int16 v16; | |
}cl_int16; | |
/* ---- cl_uintn ---- */ | |
typedef union | |
{ | |
cl_uint CL_ALIGNED(8) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_uint x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_uint s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_uint lo, hi; }; | |
__cl_uint2 v2; | |
}cl_uint2; | |
typedef union | |
{ | |
cl_uint CL_ALIGNED(16) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_uint2 lo, hi; }; | |
__cl_uint2 v2[2]; | |
__cl_uint4 v4; | |
}cl_uint4; | |
/* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */ | |
typedef cl_uint4 cl_uint3; | |
typedef union | |
{ | |
cl_uint CL_ALIGNED(32) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_uint4 lo, hi; }; | |
__cl_uint2 v2[4]; | |
__cl_uint4 v4[2]; | |
__cl_uint8 v8; | |
}cl_uint8; | |
typedef union | |
{ | |
cl_uint CL_ALIGNED(64) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_uint8 lo, hi; }; | |
__cl_uint2 v2[8]; | |
__cl_uint4 v4[4]; | |
__cl_uint8 v8[2]; | |
__cl_uint16 v16; | |
}cl_uint16; | |
/* ---- cl_longn ---- */ | |
typedef union | |
{ | |
cl_long CL_ALIGNED(16) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_long x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_long s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_long lo, hi; }; | |
__cl_long2 v2; | |
}cl_long2; | |
typedef union | |
{ | |
cl_long CL_ALIGNED(32) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_long2 lo, hi; }; | |
__cl_long2 v2[2]; | |
__cl_long4 v4; | |
}cl_long4; | |
/* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */ | |
typedef cl_long4 cl_long3; | |
typedef union | |
{ | |
cl_long CL_ALIGNED(64) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_long4 lo, hi; }; | |
__cl_long2 v2[4]; | |
__cl_long4 v4[2]; | |
__cl_long8 v8; | |
}cl_long8; | |
typedef union | |
{ | |
cl_long CL_ALIGNED(128) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_long8 lo, hi; }; | |
__cl_long2 v2[8]; | |
__cl_long4 v4[4]; | |
__cl_long8 v8[2]; | |
__cl_long16 v16; | |
}cl_long16; | |
/* ---- cl_ulongn ---- */ | |
typedef union | |
{ | |
cl_ulong CL_ALIGNED(16) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_ulong x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_ulong s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_ulong lo, hi; }; | |
__cl_ulong2 v2; | |
}cl_ulong2; | |
typedef union | |
{ | |
cl_ulong CL_ALIGNED(32) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_ulong2 lo, hi; }; | |
__cl_ulong2 v2[2]; | |
__cl_ulong4 v4; | |
}cl_ulong4; | |
/* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */ | |
typedef cl_ulong4 cl_ulong3; | |
typedef union | |
{ | |
cl_ulong CL_ALIGNED(64) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_ulong4 lo, hi; }; | |
__cl_ulong2 v2[4]; | |
__cl_ulong4 v4[2]; | |
__cl_ulong8 v8; | |
}cl_ulong8; | |
typedef union | |
{ | |
cl_ulong CL_ALIGNED(128) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_ulong8 lo, hi; }; | |
__cl_ulong2 v2[8]; | |
__cl_ulong4 v4[4]; | |
__cl_ulong8 v8[2]; | |
__cl_ulong16 v16; | |
}cl_ulong16; | |
/* --- cl_floatn ---- */ | |
typedef union | |
{ | |
cl_float CL_ALIGNED(8) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_float x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_float s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_float lo, hi; }; | |
__cl_float2 v2; | |
}cl_float2; | |
typedef union | |
{ | |
cl_float CL_ALIGNED(16) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_float2 lo, hi; }; | |
__cl_float2 v2[2]; | |
__cl_float4 v4; | |
}cl_float4; | |
/* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */ | |
typedef cl_float4 cl_float3; | |
typedef union | |
{ | |
cl_float CL_ALIGNED(32) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_float4 lo, hi; }; | |
__cl_float2 v2[4]; | |
__cl_float4 v4[2]; | |
__cl_float8 v8; | |
}cl_float8; | |
typedef union | |
{ | |
cl_float CL_ALIGNED(64) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_float8 lo, hi; }; | |
__cl_float2 v2[8]; | |
__cl_float4 v4[4]; | |
__cl_float8 v8[2]; | |
__cl_float16 v16; | |
}cl_float16; | |
/* --- cl_doublen ---- */ | |
typedef union | |
{ | |
cl_double CL_ALIGNED(16) s[2]; | |
__CL_ANON_STRUCT__ struct{ cl_double x, y; }; | |
__CL_ANON_STRUCT__ struct{ cl_double s0, s1; }; | |
__CL_ANON_STRUCT__ struct{ cl_double lo, hi; }; | |
__cl_double2 v2; | |
}cl_double2; | |
typedef union | |
{ | |
cl_double CL_ALIGNED(32) s[4]; | |
__CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3; }; | |
__CL_ANON_STRUCT__ struct{ cl_double2 lo, hi; }; | |
__cl_double2 v2[2]; | |
__cl_double4 v4; | |
}cl_double4; | |
/* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */ | |
typedef cl_double4 cl_double3; | |
typedef union | |
{ | |
cl_double CL_ALIGNED(64) s[8]; | |
__CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; }; | |
__CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; }; | |
__CL_ANON_STRUCT__ struct{ cl_double4 lo, hi; }; | |
__cl_double2 v2[4]; | |
__cl_double4 v4[2]; | |
__cl_double8 v8; | |
}cl_double8; | |
typedef union | |
{ | |
cl_double CL_ALIGNED(128) s[16]; | |
__CL_ANON_STRUCT__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; | |
__CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; | |
__CL_ANON_STRUCT__ struct{ cl_double8 lo, hi; }; | |
__cl_double2 v2[8]; | |
__cl_double4 v4[4]; | |
__cl_double8 v8[2]; | |
__cl_double16 v16; | |
}cl_double16; | |
/* Macro to facilitate debugging | |
* Usage: | |
* Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source. | |
* The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \" | |
* Each line thereafter of OpenCL C source must end with: \n\ | |
* The last line ends in "; | |
* | |
* Example: | |
* | |
* const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\ | |
* kernel void foo( int a, float * b ) \n\ | |
* { \n\ | |
* // my comment \n\ | |
* *b[ get_global_id(0)] = a; \n\ | |
* } \n\ | |
* "; | |
* | |
* This should correctly set up the line, (column) and file information for your source | |
* string so you can do source level debugging. | |
*/ | |
} | |