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