1 /* 6.1.1 Built-in Scalar Data Types */
2 
3 typedef unsigned char uchar;
4 typedef unsigned short ushort;
5 typedef unsigned int uint;
6 typedef unsigned long ulong;
7 
8 typedef __SIZE_TYPE__ size_t;
9 typedef __PTRDIFF_TYPE__ ptrdiff_t;
10 
11 #define __stdint_join3(a,b,c) a ## b ## c
12 
13 #define  __intn_t(n) __stdint_join3(__INT, n, _TYPE__)
14 #define __uintn_t(n) __stdint_join3(unsigned __INT, n, _TYPE__)
15 
16 typedef  __intn_t(__INTPTR_WIDTH__)  intptr_t;
17 typedef __uintn_t(__INTPTR_WIDTH__) uintptr_t;
18 
19 #undef __uintn_t
20 #undef __intn_t
21 #undef __stdint_join3
22 
23 /* 6.1.2 Built-in Vector Data Types */
24 
25 typedef __attribute__((ext_vector_type(2))) char char2;
26 typedef __attribute__((ext_vector_type(3))) char char3;
27 typedef __attribute__((ext_vector_type(4))) char char4;
28 typedef __attribute__((ext_vector_type(8))) char char8;
29 typedef __attribute__((ext_vector_type(16))) char char16;
30 
31 typedef __attribute__((ext_vector_type(2))) uchar uchar2;
32 typedef __attribute__((ext_vector_type(3))) uchar uchar3;
33 typedef __attribute__((ext_vector_type(4))) uchar uchar4;
34 typedef __attribute__((ext_vector_type(8))) uchar uchar8;
35 typedef __attribute__((ext_vector_type(16))) uchar uchar16;
36 
37 typedef __attribute__((ext_vector_type(2))) short short2;
38 typedef __attribute__((ext_vector_type(3))) short short3;
39 typedef __attribute__((ext_vector_type(4))) short short4;
40 typedef __attribute__((ext_vector_type(8))) short short8;
41 typedef __attribute__((ext_vector_type(16))) short short16;
42 
43 typedef __attribute__((ext_vector_type(2))) ushort ushort2;
44 typedef __attribute__((ext_vector_type(3))) ushort ushort3;
45 typedef __attribute__((ext_vector_type(4))) ushort ushort4;
46 typedef __attribute__((ext_vector_type(8))) ushort ushort8;
47 typedef __attribute__((ext_vector_type(16))) ushort ushort16;
48 
49 typedef __attribute__((ext_vector_type(2))) int int2;
50 typedef __attribute__((ext_vector_type(3))) int int3;
51 typedef __attribute__((ext_vector_type(4))) int int4;
52 typedef __attribute__((ext_vector_type(8))) int int8;
53 typedef __attribute__((ext_vector_type(16))) int int16;
54 
55 typedef __attribute__((ext_vector_type(2))) uint uint2;
56 typedef __attribute__((ext_vector_type(3))) uint uint3;
57 typedef __attribute__((ext_vector_type(4))) uint uint4;
58 typedef __attribute__((ext_vector_type(8))) uint uint8;
59 typedef __attribute__((ext_vector_type(16))) uint uint16;
60 
61 typedef __attribute__((ext_vector_type(2))) long long2;
62 typedef __attribute__((ext_vector_type(3))) long long3;
63 typedef __attribute__((ext_vector_type(4))) long long4;
64 typedef __attribute__((ext_vector_type(8))) long long8;
65 typedef __attribute__((ext_vector_type(16))) long long16;
66 
67 typedef __attribute__((ext_vector_type(2))) ulong ulong2;
68 typedef __attribute__((ext_vector_type(3))) ulong ulong3;
69 typedef __attribute__((ext_vector_type(4))) ulong ulong4;
70 typedef __attribute__((ext_vector_type(8))) ulong ulong8;
71 typedef __attribute__((ext_vector_type(16))) ulong ulong16;
72 
73 typedef __attribute__((ext_vector_type(2))) float float2;
74 typedef __attribute__((ext_vector_type(3))) float float3;
75 typedef __attribute__((ext_vector_type(4))) float float4;
76 typedef __attribute__((ext_vector_type(8))) float float8;
77 typedef __attribute__((ext_vector_type(16))) float float16;
78 
79 /* 9.3 Double Precision Floating-Point */
80 
81 #ifdef cl_khr_fp64
82 typedef __attribute__((ext_vector_type(2))) double double2;
83 typedef __attribute__((ext_vector_type(3))) double double3;
84 typedef __attribute__((ext_vector_type(4))) double double4;
85 typedef __attribute__((ext_vector_type(8))) double double8;
86 typedef __attribute__((ext_vector_type(16))) double double16;
87 #endif
88 
89 #ifdef cl_khr_fp16
90 typedef __attribute__((ext_vector_type(2))) half half2;
91 typedef __attribute__((ext_vector_type(3))) half half3;
92 typedef __attribute__((ext_vector_type(4))) half half4;
93 typedef __attribute__((ext_vector_type(8))) half half8;
94 typedef __attribute__((ext_vector_type(16))) half half16;
95 #endif
96