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