2 ** Copyright (c) 2015-2019 The Khronos Group Inc.
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:
11 ** The above copyright notice and this permission notice shall be included in
12 ** all copies or substantial portions of the Materials.
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/
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
35 // Section 2.1: Math extended instructions
132 // Section 2.2: Integer instructions
168 // Section 2.3: Common instructions
179 // Section 2.4: Geometric instructions
186 Fast_normalize
= 110,
188 // Section 2.5: Relational instructions
192 // Section 2.6: Vector Data Load and Store instructions
200 Vstore_halfn_r
= 178,
203 Vstorea_halfn_r
= 181,
205 // Section 2.7: Miscellaneous Vector instructions
209 // Section 2.8: Misc instructions
214 } // end namespace OpenCLLIB
218 enum OpenCLstd_Entrypoints
{
220 // Section 2.1: Math extended instructions
223 OpenCLstd_Acospi
= 2,
226 OpenCLstd_Asinpi
= 5,
230 OpenCLstd_Atanpi
= 9,
231 OpenCLstd_Atan2pi
= 10,
234 OpenCLstd_Copysign
= 13,
237 OpenCLstd_Cospi
= 16,
242 OpenCLstd_Exp10
= 21,
243 OpenCLstd_Expm1
= 22,
246 OpenCLstd_Floor
= 25,
251 OpenCLstd_Fract
= 30,
252 OpenCLstd_Frexp
= 31,
253 OpenCLstd_Hypot
= 32,
254 OpenCLstd_Ilogb
= 33,
255 OpenCLstd_Ldexp
= 34,
256 OpenCLstd_Lgamma
= 35,
257 OpenCLstd_Lgamma_r
= 36,
260 OpenCLstd_Log10
= 39,
261 OpenCLstd_Log1p
= 40,
264 OpenCLstd_Maxmag
= 43,
265 OpenCLstd_Minmag
= 44,
268 OpenCLstd_Nextafter
= 47,
272 OpenCLstd_Remainder
= 51,
273 OpenCLstd_Remquo
= 52,
275 OpenCLstd_Rootn
= 54,
276 OpenCLstd_Round
= 55,
277 OpenCLstd_Rsqrt
= 56,
279 OpenCLstd_Sincos
= 58,
281 OpenCLstd_Sinpi
= 60,
285 OpenCLstd_Tanpi
= 64,
286 OpenCLstd_Tgamma
= 65,
287 OpenCLstd_Trunc
= 66,
288 OpenCLstd_Half_cos
= 67,
289 OpenCLstd_Half_divide
= 68,
290 OpenCLstd_Half_exp
= 69,
291 OpenCLstd_Half_exp2
= 70,
292 OpenCLstd_Half_exp10
= 71,
293 OpenCLstd_Half_log
= 72,
294 OpenCLstd_Half_log2
= 73,
295 OpenCLstd_Half_log10
= 74,
296 OpenCLstd_Half_powr
= 75,
297 OpenCLstd_Half_recip
= 76,
298 OpenCLstd_Half_rsqrt
= 77,
299 OpenCLstd_Half_sin
= 78,
300 OpenCLstd_Half_sqrt
= 79,
301 OpenCLstd_Half_tan
= 80,
302 OpenCLstd_Native_cos
= 81,
303 OpenCLstd_Native_divide
= 82,
304 OpenCLstd_Native_exp
= 83,
305 OpenCLstd_Native_exp2
= 84,
306 OpenCLstd_Native_exp10
= 85,
307 OpenCLstd_Native_log
= 86,
308 OpenCLstd_Native_log2
= 87,
309 OpenCLstd_Native_log10
= 88,
310 OpenCLstd_Native_powr
= 89,
311 OpenCLstd_Native_recip
= 90,
312 OpenCLstd_Native_rsqrt
= 91,
313 OpenCLstd_Native_sin
= 92,
314 OpenCLstd_Native_sqrt
= 93,
315 OpenCLstd_Native_tan
= 94,
317 // Section 2.2: Integer instructions
318 OpenCLstd_SAbs
= 141,
319 OpenCLstd_SAbs_diff
= 142,
320 OpenCLstd_SAdd_sat
= 143,
321 OpenCLstd_UAdd_sat
= 144,
322 OpenCLstd_SHadd
= 145,
323 OpenCLstd_UHadd
= 146,
324 OpenCLstd_SRhadd
= 147,
325 OpenCLstd_URhadd
= 148,
326 OpenCLstd_SClamp
= 149,
327 OpenCLstd_UClamp
= 150,
330 OpenCLstd_SMad_hi
= 153,
331 OpenCLstd_UMad_sat
= 154,
332 OpenCLstd_SMad_sat
= 155,
333 OpenCLstd_SMax
= 156,
334 OpenCLstd_UMax
= 157,
335 OpenCLstd_SMin
= 158,
336 OpenCLstd_UMin
= 159,
337 OpenCLstd_SMul_hi
= 160,
338 OpenCLstd_Rotate
= 161,
339 OpenCLstd_SSub_sat
= 162,
340 OpenCLstd_USub_sat
= 163,
341 OpenCLstd_U_Upsample
= 164,
342 OpenCLstd_S_Upsample
= 165,
343 OpenCLstd_Popcount
= 166,
344 OpenCLstd_SMad24
= 167,
345 OpenCLstd_UMad24
= 168,
346 OpenCLstd_SMul24
= 169,
347 OpenCLstd_UMul24
= 170,
348 OpenCLstd_UAbs
= 201,
349 OpenCLstd_UAbs_diff
= 202,
350 OpenCLstd_UMul_hi
= 203,
351 OpenCLstd_UMad_hi
= 204,
353 // Section 2.3: Common instructions
354 OpenCLstd_FClamp
= 95,
355 OpenCLstd_Degrees
= 96,
356 OpenCLstd_FMax_common
= 97,
357 OpenCLstd_FMin_common
= 98,
359 OpenCLstd_Radians
= 100,
360 OpenCLstd_Step
= 101,
361 OpenCLstd_Smoothstep
= 102,
362 OpenCLstd_Sign
= 103,
364 // Section 2.4: Geometric instructions
365 OpenCLstd_Cross
= 104,
366 OpenCLstd_Distance
= 105,
367 OpenCLstd_Length
= 106,
368 OpenCLstd_Normalize
= 107,
369 OpenCLstd_Fast_distance
= 108,
370 OpenCLstd_Fast_length
= 109,
371 OpenCLstd_Fast_normalize
= 110,
373 // Section 2.5: Relational instructions
374 OpenCLstd_Bitselect
= 186,
375 OpenCLstd_Select
= 187,
377 // Section 2.6: Vector Data Load and Store instructions
378 OpenCLstd_Vloadn
= 171,
379 OpenCLstd_Vstoren
= 172,
380 OpenCLstd_Vload_half
= 173,
381 OpenCLstd_Vload_halfn
= 174,
382 OpenCLstd_Vstore_half
= 175,
383 OpenCLstd_Vstore_half_r
= 176,
384 OpenCLstd_Vstore_halfn
= 177,
385 OpenCLstd_Vstore_halfn_r
= 178,
386 OpenCLstd_Vloada_halfn
= 179,
387 OpenCLstd_Vstorea_halfn
= 180,
388 OpenCLstd_Vstorea_halfn_r
= 181,
390 // Section 2.7: Miscellaneous Vector instructions
391 OpenCLstd_Shuffle
= 182,
392 OpenCLstd_Shuffle2
= 183,
394 // Section 2.8: Misc instructions
395 OpenCLstd_Printf
= 184,
396 OpenCLstd_Prefetch
= 185,
401 #endif // #ifndef OPENCLstd_H