1/*
2** Copyright (c) 2015 The Khronos Group Inc.
3**
4** Permission is hereby granted, free of charge, to any person obtaining a copy
5** of this software and/or associated documentation files (the "Materials"),
6** to deal in the Materials without restriction, including without limitation
7** the rights to use, copy, modify, merge, publish, distribute, sublicense,
8** and/or sell copies of the Materials, and to permit persons to whom the
9** Materials are furnished to do so, subject to the following conditions:
10**
11** The above copyright notice and this permission notice shall be included in
12** all copies or substantial portions of the Materials.
13**
14** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
15** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
16** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
17**
18** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
24** IN THE MATERIALS.
25*/
26
27//
28// Author: Boaz Ouriel, Intel
29//
30
31namespace OpenCLLIB {
32
33enum Entrypoints {
34
35    // math functions
36    Acos = 0,
37    Acosh = 1,
38    Acospi = 2,
39    Asin = 3,
40    Asinh = 4,
41    Asinpi = 5,
42    Atan = 6,
43    Atan2 = 7,
44    Atanh = 8,
45    Atanpi = 9,
46    Atan2pi = 10,
47    Cbrt = 11,
48    Ceil = 12,
49    Copysign = 13,
50    Cos = 14,
51    Cosh = 15,
52    Cospi = 16,
53    Erfc = 17,
54    Erf = 18,
55    Exp = 19,
56    Exp2 = 20,
57    Exp10 = 21,
58    Expm1 = 22,
59    Fabs = 23,
60    Fdim = 24,
61    Floor = 25,
62    Fma = 26,
63    Fmax = 27,
64    Fmin = 28,
65    Fmod = 29,
66    Fract = 30,
67    Frexp = 31,
68    Hypot = 32,
69    Ilogb = 33,
70    Ldexp = 34,
71    Lgamma = 35,
72    Lgamma_r = 36,
73    Log = 37,
74    Log2 = 38,
75    Log10 = 39,
76    Log1p = 40,
77    Logb = 41,
78    Mad = 42,
79    Maxmag = 43,
80    Minmag = 44,
81    Modf = 45,
82    Nan = 46,
83    Nextafter = 47,
84    Pow = 48,
85    Pown = 49,
86    Powr = 50,
87    Remainder = 51,
88    Remquo = 52,
89    Rint = 53,
90    Rootn = 54,
91    Round = 55,
92    Rsqrt = 56,
93    Sin = 57,
94    Sincos = 58,
95    Sinh = 59,
96    Sinpi = 60,
97    Sqrt = 61,
98    Tan = 62,
99    Tanh = 63,
100    Tanpi = 64,
101    Tgamma = 65,
102    Trunc = 66,
103    Half_cos = 67,
104    Half_divide = 68,
105    Half_exp = 69,
106    Half_exp2 = 70,
107    Half_exp10 = 71,
108    Half_log = 72,
109    Half_log2 = 73,
110    Half_log10 = 74,
111    Half_powr = 75,
112    Half_recip = 76,
113    Half_rsqrt = 77,
114    Half_sin = 78,
115    Half_sqrt = 79,
116    Half_tan = 80,
117    Native_cos = 81,
118    Native_divide = 82,
119    Native_exp = 83,
120    Native_exp2 = 84,
121    Native_exp10 = 85,
122    Native_log = 86,
123    Native_log2 = 87,
124    Native_log10 = 88,
125    Native_powr = 89,
126    Native_recip = 90,
127    Native_rsqrt = 91,
128    Native_sin = 92,
129    Native_sqrt = 93,
130    Native_tan = 94,
131
132    // Common
133    FClamp = 95,
134    Degrees = 96,
135    FMax_common = 97,
136    FMin_common = 98,
137    Mix = 99,
138    Radians = 100,
139    Step = 101,
140    Smoothstep = 102,
141    Sign = 103,
142
143    // Geometrics
144    Cross = 104,
145    Distance = 105,
146    Length = 106,
147    Normalize = 107,
148    Fast_distance = 108,
149    Fast_length = 109,
150    Fast_normalize = 110,
151
152    // Images - Deprecated
153    Read_imagef = 111,
154    Read_imagei = 112,
155    Read_imageui = 113,
156    Read_imageh = 114,
157
158    Read_imagef_samplerless = 115,
159    Read_imagei_samplerless = 116,
160    Read_imageui_samplerless = 117,
161    Read_imageh_samplerless = 118,
162
163    Write_imagef = 119,
164    Write_imagei = 120,
165    Write_imageui = 121,
166    Write_imageh = 122,
167    Read_imagef_mipmap_lod = 123,
168    Read_imagei_mipmap_lod = 124,
169    Read_imageui_mipmap_lod = 125,
170    Read_imagef_mipmap_grad = 126,
171    Read_imagei_mipmap_grad = 127,
172    Read_imageui_mipmap_grad = 128,
173
174    // Image write with LOD
175    Write_imagef_mipmap_lod = 129,
176    Write_imagei_mipmap_lod = 130,
177    Write_imageui_mipmap_lod = 131,
178
179    // Images - Deprecated
180    Get_image_width = 132,
181    Get_image_height = 133,
182    Get_image_depth = 134,
183    Get_image_channel_data_type = 135,
184    Get_image_channel_order = 136,
185    Get_image_dim = 137,
186    Get_image_array_size = 138,
187    Get_image_num_samples = 139,
188    Get_image_num_mip_levels = 140,
189
190    // Integers
191    SAbs = 141,
192    SAbs_diff = 142,
193    SAdd_sat = 143,
194    UAdd_sat = 144,
195    SHadd = 145,
196    UHadd = 146,
197    SRhadd = 147,
198    URhadd = 148,
199    SClamp = 149,
200    UClamp = 150,
201    Clz = 151,
202    Ctz = 152,
203    SMad_hi = 153,
204    UMad_sat = 154,
205    SMad_sat = 155,
206    SMax = 156,
207    UMax = 157,
208    SMin = 158,
209    UMin = 159,
210    SMul_hi = 160,
211    Rotate = 161,
212    SSub_sat = 162,
213    USub_sat = 163,
214    U_Upsample = 164,
215    S_Upsample = 165,
216    Popcount = 166,
217    SMad24 = 167,
218    UMad24 = 168,
219    SMul24 = 169,
220    UMul24 = 170,
221
222    // Vector Loads/Stores
223    Vloadn = 171,
224    Vstoren = 172,
225    Vload_half = 173,
226    Vload_halfn = 174,
227    Vstore_half = 175,
228    Vstore_half_r = 176,
229    Vstore_halfn = 177,
230    Vstore_halfn_r = 178,
231    Vloada_halfn = 179,
232    Vstorea_halfn = 180,
233    Vstorea_halfn_r = 181,
234
235    // Vector Misc
236    Shuffle = 182,
237    Shuffle2 = 183,
238
239    //
240    Printf = 184,
241    Prefetch = 185,
242
243    // Relationals
244    Bitselect = 186,
245    Select = 187,
246
247    // pipes
248    Read_pipe = 188,
249    Write_pipe = 189,
250    Reserve_read_pipe = 190,
251    Reserve_write_pipe = 191,
252    Commit_read_pipe = 192,
253    Commit_write_pipe = 193,
254    Is_valid_reserve_id = 194,
255    Work_group_reserve_read_pipe = 195,
256    Work_group_reserve_write_pipe = 196,
257    Work_group_commit_read_pipe = 197,
258    Work_group_commit_write_pipe = 198,
259    Get_pipe_num_packets = 199,
260    Get_pipe_max_packets = 200,
261
262    // more integers
263    UAbs = 201,
264    UAbs_diff = 202,
265    UMul_hi = 203,
266    UMad_hi = 204,
267};
268
269} // end namespace OpenCL20
270