OpenCL.std.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. /*
  2. ** Copyright (c) 2015-2017 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. namespace OpenCLLIB {
  27. enum Entrypoints {
  28. // Section 2.1: Math extended instructions
  29. Acos = 0,
  30. Acosh = 1,
  31. Acospi = 2,
  32. Asin = 3,
  33. Asinh = 4,
  34. Asinpi = 5,
  35. Atan = 6,
  36. Atan2 = 7,
  37. Atanh = 8,
  38. Atanpi = 9,
  39. Atan2pi = 10,
  40. Cbrt = 11,
  41. Ceil = 12,
  42. Copysign = 13,
  43. Cos = 14,
  44. Cosh = 15,
  45. Cospi = 16,
  46. Erfc = 17,
  47. Erf = 18,
  48. Exp = 19,
  49. Exp2 = 20,
  50. Exp10 = 21,
  51. Expm1 = 22,
  52. Fabs = 23,
  53. Fdim = 24,
  54. Floor = 25,
  55. Fma = 26,
  56. Fmax = 27,
  57. Fmin = 28,
  58. Fmod = 29,
  59. Fract = 30,
  60. Frexp = 31,
  61. Hypot = 32,
  62. Ilogb = 33,
  63. Ldexp = 34,
  64. Lgamma = 35,
  65. Lgamma_r = 36,
  66. Log = 37,
  67. Log2 = 38,
  68. Log10 = 39,
  69. Log1p = 40,
  70. Logb = 41,
  71. Mad = 42,
  72. Maxmag = 43,
  73. Minmag = 44,
  74. Modf = 45,
  75. Nan = 46,
  76. Nextafter = 47,
  77. Pow = 48,
  78. Pown = 49,
  79. Powr = 50,
  80. Remainder = 51,
  81. Remquo = 52,
  82. Rint = 53,
  83. Rootn = 54,
  84. Round = 55,
  85. Rsqrt = 56,
  86. Sin = 57,
  87. Sincos = 58,
  88. Sinh = 59,
  89. Sinpi = 60,
  90. Sqrt = 61,
  91. Tan = 62,
  92. Tanh = 63,
  93. Tanpi = 64,
  94. Tgamma = 65,
  95. Trunc = 66,
  96. Half_cos = 67,
  97. Half_divide = 68,
  98. Half_exp = 69,
  99. Half_exp2 = 70,
  100. Half_exp10 = 71,
  101. Half_log = 72,
  102. Half_log2 = 73,
  103. Half_log10 = 74,
  104. Half_powr = 75,
  105. Half_recip = 76,
  106. Half_rsqrt = 77,
  107. Half_sin = 78,
  108. Half_sqrt = 79,
  109. Half_tan = 80,
  110. Native_cos = 81,
  111. Native_divide = 82,
  112. Native_exp = 83,
  113. Native_exp2 = 84,
  114. Native_exp10 = 85,
  115. Native_log = 86,
  116. Native_log2 = 87,
  117. Native_log10 = 88,
  118. Native_powr = 89,
  119. Native_recip = 90,
  120. Native_rsqrt = 91,
  121. Native_sin = 92,
  122. Native_sqrt = 93,
  123. Native_tan = 94,
  124. // Section 2.2: Integer instructions
  125. SAbs = 141,
  126. SAbs_diff = 142,
  127. SAdd_sat = 143,
  128. UAdd_sat = 144,
  129. SHadd = 145,
  130. UHadd = 146,
  131. SRhadd = 147,
  132. URhadd = 148,
  133. SClamp = 149,
  134. UClamp = 150,
  135. Clz = 151,
  136. Ctz = 152,
  137. SMad_hi = 153,
  138. UMad_sat = 154,
  139. SMad_sat = 155,
  140. SMax = 156,
  141. UMax = 157,
  142. SMin = 158,
  143. UMin = 159,
  144. SMul_hi = 160,
  145. Rotate = 161,
  146. SSub_sat = 162,
  147. USub_sat = 163,
  148. U_Upsample = 164,
  149. S_Upsample = 165,
  150. Popcount = 166,
  151. SMad24 = 167,
  152. UMad24 = 168,
  153. SMul24 = 169,
  154. UMul24 = 170,
  155. UAbs = 201,
  156. UAbs_diff = 202,
  157. UMul_hi = 203,
  158. UMad_hi = 204,
  159. // Section 2.3: Common instructions
  160. FClamp = 95,
  161. Degrees = 96,
  162. FMax_common = 97,
  163. FMin_common = 98,
  164. Mix = 99,
  165. Radians = 100,
  166. Step = 101,
  167. Smoothstep = 102,
  168. Sign = 103,
  169. // Section 2.4: Geometric instructions
  170. Cross = 104,
  171. Distance = 105,
  172. Length = 106,
  173. Normalize = 107,
  174. Fast_distance = 108,
  175. Fast_length = 109,
  176. Fast_normalize = 110,
  177. // Section 2.5: Relational instructions
  178. Bitselect = 186,
  179. Select = 187,
  180. // Section 2.6: Vector Data Load and Store instructions
  181. Vloadn = 171,
  182. Vstoren = 172,
  183. Vload_half = 173,
  184. Vload_halfn = 174,
  185. Vstore_half = 175,
  186. Vstore_half_r = 176,
  187. Vstore_halfn = 177,
  188. Vstore_halfn_r = 178,
  189. Vloada_halfn = 179,
  190. Vstorea_halfn = 180,
  191. Vstorea_halfn_r = 181,
  192. // Section 2.7: Miscellaneous Vector instructions
  193. Shuffle = 182,
  194. Shuffle2 = 183,
  195. // Section 2.8: Misc instructions
  196. Printf = 184,
  197. Prefetch = 185,
  198. };
  199. } // end namespace OpenCLLIB