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