LLVM  10.0.0svn
cl_common_defines.h
Go to the documentation of this file.
1 #ifndef CL_COMMON_DEFINES_H
2 #define CL_COMMON_DEFINES_H
3 // This file includes defines that are common to both kernel code and
4 // the NVPTX back-end.
5 
6 //
7 // Common defines for Image intrinsics
8 // Channel order
9 enum {
10  CLK_R = 0x10B0,
11  CLK_A = 0x10B1,
12  CLK_RG = 0x10B2,
13  CLK_RA = 0x10B3,
14  CLK_RGB = 0x10B4,
15  CLK_RGBA = 0x10B5,
16  CLK_BGRA = 0x10B6,
17  CLK_ARGB = 0x10B7,
18 
19 #if (__NV_CL_C_VERSION == __NV_CL_C_VERSION_1_0)
20  CLK_xRGB = 0x10B7,
21 #endif
22 
23  CLK_INTENSITY = 0x10B8,
24  CLK_LUMINANCE = 0x10B9
25 
26 #if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_1_1)
27  ,
28  CLK_Rx = 0x10BA,
29  CLK_RGx = 0x10BB,
30  CLK_RGBx = 0x10BC
31 #endif
32 };
33 
34 typedef enum clk_channel_type {
35  // valid formats for float return types
36  CLK_SNORM_INT8 = 0x10D0, // four channel RGBA unorm8
37  CLK_SNORM_INT16 = 0x10D1, // four channel RGBA unorm16
38  CLK_UNORM_INT8 = 0x10D2, // four channel RGBA unorm8
39  CLK_UNORM_INT16 = 0x10D3, // four channel RGBA unorm16
40  CLK_HALF_FLOAT = 0x10DD, // four channel RGBA half
41  CLK_FLOAT = 0x10DE, // four channel RGBA float
42 
43 #if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_1_1)
47 #endif
48 
49  // valid only for integer return types
50  CLK_SIGNED_INT8 = 0x10D7,
51  CLK_SIGNED_INT16 = 0x10D8,
52  CLK_SIGNED_INT32 = 0x10D9,
56 
57  // CI SPI for CPU
58  __CLK_UNORM_INT8888, // four channel ARGB unorm8
59  __CLK_UNORM_INT8888R, // four channel BGRA unorm8
60 
63  __CLK_VALID_IMAGE_TYPE_MASK_BITS = 4, // number of bits required to
64  // represent any image type
67 
68 typedef enum clk_sampler_type {
75 
76 #if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_1_1)
78 #endif
82  __CLK_ADDRESS_BITS = 3, // number of bits required to
83  // represent address info
84 
90  __CLK_NORMALIZED_BITS = 1, // number of bits required to
91  // represent normalization
92 
99  __CLK_FILTER_BITS = 2, // number of bits required to
100  // represent address info
101 
108 
112 
115  (int) 0x80000000 >> (__CLK_ANISOTROPIC_RATIO_BITS - 1)
117 
118 // Memory synchronization
119 #define CLK_LOCAL_MEM_FENCE (1 << 0)
120 #define CLK_GLOBAL_MEM_FENCE (1 << 1)
121 
122 #endif // CL_COMMON_DEFINES_H
clk_channel_type
clk_sampler_type