1 #define as_char(x) __builtin_astype(x, char)
2 #define as_uchar(x) __builtin_astype(x, uchar)
3 #define as_short(x) __builtin_astype(x, short)
4 #define as_ushort(x) __builtin_astype(x, ushort)
5 #define as_int(x) __builtin_astype(x, int)
6 #define as_uint(x) __builtin_astype(x, uint)
7 #define as_long(x) __builtin_astype(x, long)
8 #define as_ulong(x) __builtin_astype(x, ulong)
9 #define as_float(x) __builtin_astype(x, float)
10 
11 #define as_char2(x) __builtin_astype(x, char2)
12 #define as_uchar2(x) __builtin_astype(x, uchar2)
13 #define as_short2(x) __builtin_astype(x, short2)
14 #define as_ushort2(x) __builtin_astype(x, ushort2)
15 #define as_int2(x) __builtin_astype(x, int2)
16 #define as_uint2(x) __builtin_astype(x, uint2)
17 #define as_long2(x) __builtin_astype(x, long2)
18 #define as_ulong2(x) __builtin_astype(x, ulong2)
19 #define as_float2(x) __builtin_astype(x, float2)
20 
21 #define as_char3(x) __builtin_astype(x, char3)
22 #define as_uchar3(x) __builtin_astype(x, uchar3)
23 #define as_short3(x) __builtin_astype(x, short3)
24 #define as_ushort3(x) __builtin_astype(x, ushort3)
25 #define as_int3(x) __builtin_astype(x, int3)
26 #define as_uint3(x) __builtin_astype(x, uint3)
27 #define as_long3(x) __builtin_astype(x, long3)
28 #define as_ulong3(x) __builtin_astype(x, ulong3)
29 #define as_float3(x) __builtin_astype(x, float3)
30 
31 #define as_char4(x) __builtin_astype(x, char4)
32 #define as_uchar4(x) __builtin_astype(x, uchar4)
33 #define as_short4(x) __builtin_astype(x, short4)
34 #define as_ushort4(x) __builtin_astype(x, ushort4)
35 #define as_int4(x) __builtin_astype(x, int4)
36 #define as_uint4(x) __builtin_astype(x, uint4)
37 #define as_long4(x) __builtin_astype(x, long4)
38 #define as_ulong4(x) __builtin_astype(x, ulong4)
39 #define as_float4(x) __builtin_astype(x, float4)
40 
41 #define as_char8(x) __builtin_astype(x, char8)
42 #define as_uchar8(x) __builtin_astype(x, uchar8)
43 #define as_short8(x) __builtin_astype(x, short8)
44 #define as_ushort8(x) __builtin_astype(x, ushort8)
45 #define as_int8(x) __builtin_astype(x, int8)
46 #define as_uint8(x) __builtin_astype(x, uint8)
47 #define as_long8(x) __builtin_astype(x, long8)
48 #define as_ulong8(x) __builtin_astype(x, ulong8)
49 #define as_float8(x) __builtin_astype(x, float8)
50 
51 #define as_char16(x) __builtin_astype(x, char16)
52 #define as_uchar16(x) __builtin_astype(x, uchar16)
53 #define as_short16(x) __builtin_astype(x, short16)
54 #define as_ushort16(x) __builtin_astype(x, ushort16)
55 #define as_int16(x) __builtin_astype(x, int16)
56 #define as_uint16(x) __builtin_astype(x, uint16)
57 #define as_long16(x) __builtin_astype(x, long16)
58 #define as_ulong16(x) __builtin_astype(x, ulong16)
59 #define as_float16(x) __builtin_astype(x, float16)
60 
61 #ifdef cl_khr_fp64
62 #define as_double(x) __builtin_astype(x, double)
63 #define as_double2(x) __builtin_astype(x, double2)
64 #define as_double3(x) __builtin_astype(x, double3)
65 #define as_double4(x) __builtin_astype(x, double4)
66 #define as_double8(x) __builtin_astype(x, double8)
67 #define as_double16(x) __builtin_astype(x, double16)
68 #endif
69 
70 #ifdef cl_khr_fp16
71 #define as_half(x) __builtin_astype(x, half)
72 #define as_half2(x) __builtin_astype(x, half2)
73 #define as_half3(x) __builtin_astype(x, half3)
74 #define as_half4(x) __builtin_astype(x, half4)
75 #define as_half8(x) __builtin_astype(x, half8)
76 #define as_half16(x) __builtin_astype(x, half16)
77 #endif
78