1b8e80941Smrg/*
2b8e80941Smrg** Copyright (c) 2015-2017 The Khronos Group Inc.
3b8e80941Smrg**
4b8e80941Smrg** Permission is hereby granted, free of charge, to any person obtaining a copy
5b8e80941Smrg** of this software and/or associated documentation files (the "Materials"),
6b8e80941Smrg** to deal in the Materials without restriction, including without limitation
7b8e80941Smrg** the rights to use, copy, modify, merge, publish, distribute, sublicense,
8b8e80941Smrg** and/or sell copies of the Materials, and to permit persons to whom the
9b8e80941Smrg** Materials are furnished to do so, subject to the following conditions:
10b8e80941Smrg**
11b8e80941Smrg** The above copyright notice and this permission notice shall be included in
12b8e80941Smrg** all copies or substantial portions of the Materials.
13b8e80941Smrg**
14b8e80941Smrg** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
15b8e80941Smrg** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
16b8e80941Smrg** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
17b8e80941Smrg**
18b8e80941Smrg** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19b8e80941Smrg** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20b8e80941Smrg** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21b8e80941Smrg** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22b8e80941Smrg** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23b8e80941Smrg** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
24b8e80941Smrg** IN THE MATERIALS.
25b8e80941Smrg*/
26b8e80941Smrg
27b8e80941Smrg#ifndef OpenCLstd_H
28b8e80941Smrg#define OpenCLstd_H
29b8e80941Smrg
30b8e80941Smrgenum OpenCLstd {
31b8e80941Smrg
32b8e80941Smrg    // Section 2.1: Math extended instructions
33b8e80941Smrg    Acos = 0,
34b8e80941Smrg    Acosh = 1,
35b8e80941Smrg    Acospi = 2,
36b8e80941Smrg    Asin = 3,
37b8e80941Smrg    Asinh = 4,
38b8e80941Smrg    Asinpi = 5,
39b8e80941Smrg    Atan = 6,
40b8e80941Smrg    Atan2 = 7,
41b8e80941Smrg    Atanh = 8,
42b8e80941Smrg    Atanpi = 9,
43b8e80941Smrg    Atan2pi = 10,
44b8e80941Smrg    Cbrt = 11,
45b8e80941Smrg    Ceil = 12,
46b8e80941Smrg    Copysign = 13,
47b8e80941Smrg    Cos = 14,
48b8e80941Smrg    Cosh = 15,
49b8e80941Smrg    Cospi = 16,
50b8e80941Smrg    Erfc = 17,
51b8e80941Smrg    Erf = 18,
52b8e80941Smrg    Exp = 19,
53b8e80941Smrg    Exp2 = 20,
54b8e80941Smrg    Exp10 = 21,
55b8e80941Smrg    Expm1 = 22,
56b8e80941Smrg    Fabs = 23,
57b8e80941Smrg    Fdim = 24,
58b8e80941Smrg    Floor = 25,
59b8e80941Smrg    Fma = 26,
60b8e80941Smrg    Fmax = 27,
61b8e80941Smrg    Fmin = 28,
62b8e80941Smrg    Fmod = 29,
63b8e80941Smrg    Fract = 30,
64b8e80941Smrg    Frexp = 31,
65b8e80941Smrg    Hypot = 32,
66b8e80941Smrg    Ilogb = 33,
67b8e80941Smrg    Ldexp = 34,
68b8e80941Smrg    Lgamma = 35,
69b8e80941Smrg    Lgamma_r = 36,
70b8e80941Smrg    Log = 37,
71b8e80941Smrg    Log2 = 38,
72b8e80941Smrg    Log10 = 39,
73b8e80941Smrg    Log1p = 40,
74b8e80941Smrg    Logb = 41,
75b8e80941Smrg    Mad = 42,
76b8e80941Smrg    Maxmag = 43,
77b8e80941Smrg    Minmag = 44,
78b8e80941Smrg    Modf = 45,
79b8e80941Smrg    Nan = 46,
80b8e80941Smrg    Nextafter = 47,
81b8e80941Smrg    Pow = 48,
82b8e80941Smrg    Pown = 49,
83b8e80941Smrg    Powr = 50,
84b8e80941Smrg    Remainder = 51,
85b8e80941Smrg    Remquo = 52,
86b8e80941Smrg    Rint = 53,
87b8e80941Smrg    Rootn = 54,
88b8e80941Smrg    Round = 55,
89b8e80941Smrg    Rsqrt = 56,
90b8e80941Smrg    Sin = 57,
91b8e80941Smrg    Sincos = 58,
92b8e80941Smrg    Sinh = 59,
93b8e80941Smrg    Sinpi = 60,
94b8e80941Smrg    Sqrt = 61,
95b8e80941Smrg    Tan = 62,
96b8e80941Smrg    Tanh = 63,
97b8e80941Smrg    Tanpi = 64,
98b8e80941Smrg    Tgamma = 65,
99b8e80941Smrg    Trunc = 66,
100b8e80941Smrg    Half_cos = 67,
101b8e80941Smrg    Half_divide = 68,
102b8e80941Smrg    Half_exp = 69,
103b8e80941Smrg    Half_exp2 = 70,
104b8e80941Smrg    Half_exp10 = 71,
105b8e80941Smrg    Half_log = 72,
106b8e80941Smrg    Half_log2 = 73,
107b8e80941Smrg    Half_log10 = 74,
108b8e80941Smrg    Half_powr = 75,
109b8e80941Smrg    Half_recip = 76,
110b8e80941Smrg    Half_rsqrt = 77,
111b8e80941Smrg    Half_sin = 78,
112b8e80941Smrg    Half_sqrt = 79,
113b8e80941Smrg    Half_tan = 80,
114b8e80941Smrg    Native_cos = 81,
115b8e80941Smrg    Native_divide = 82,
116b8e80941Smrg    Native_exp = 83,
117b8e80941Smrg    Native_exp2 = 84,
118b8e80941Smrg    Native_exp10 = 85,
119b8e80941Smrg    Native_log = 86,
120b8e80941Smrg    Native_log2 = 87,
121b8e80941Smrg    Native_log10 = 88,
122b8e80941Smrg    Native_powr = 89,
123b8e80941Smrg    Native_recip = 90,
124b8e80941Smrg    Native_rsqrt = 91,
125b8e80941Smrg    Native_sin = 92,
126b8e80941Smrg    Native_sqrt = 93,
127b8e80941Smrg    Native_tan = 94,
128b8e80941Smrg
129b8e80941Smrg    // Section 2.2: Integer instructions
130b8e80941Smrg    SAbs = 141,
131b8e80941Smrg    SAbs_diff = 142,
132b8e80941Smrg    SAdd_sat = 143,
133b8e80941Smrg    UAdd_sat = 144,
134b8e80941Smrg    SHadd = 145,
135b8e80941Smrg    UHadd = 146,
136b8e80941Smrg    SRhadd = 147,
137b8e80941Smrg    URhadd = 148,
138b8e80941Smrg    SClamp = 149,
139b8e80941Smrg    UClamp = 150,
140b8e80941Smrg    Clz = 151,
141b8e80941Smrg    Ctz = 152,
142b8e80941Smrg    SMad_hi = 153,
143b8e80941Smrg    UMad_sat = 154,
144b8e80941Smrg    SMad_sat = 155,
145b8e80941Smrg    SMax = 156,
146b8e80941Smrg    UMax = 157,
147b8e80941Smrg    SMin = 158,
148b8e80941Smrg    UMin = 159,
149b8e80941Smrg    SMul_hi = 160,
150b8e80941Smrg    Rotate = 161,
151b8e80941Smrg    SSub_sat = 162,
152b8e80941Smrg    USub_sat = 163,
153b8e80941Smrg    U_Upsample = 164,
154b8e80941Smrg    S_Upsample = 165,
155b8e80941Smrg    Popcount = 166,
156b8e80941Smrg    SMad24 = 167,
157b8e80941Smrg    UMad24 = 168,
158b8e80941Smrg    SMul24 = 169,
159b8e80941Smrg    UMul24 = 170,
160b8e80941Smrg    UAbs = 201,
161b8e80941Smrg    UAbs_diff = 202,
162b8e80941Smrg    UMul_hi = 203,
163b8e80941Smrg    UMad_hi = 204,
164b8e80941Smrg
165b8e80941Smrg    // Section 2.3: Common instructions
166b8e80941Smrg    FClamp = 95,
167b8e80941Smrg    Degrees = 96,
168b8e80941Smrg    FMax_common = 97,
169b8e80941Smrg    FMin_common = 98,
170b8e80941Smrg    Mix = 99,
171b8e80941Smrg    Radians = 100,
172b8e80941Smrg    Step = 101,
173b8e80941Smrg    Smoothstep = 102,
174b8e80941Smrg    Sign = 103,
175b8e80941Smrg
176b8e80941Smrg    // Section 2.4: Geometric instructions
177b8e80941Smrg    Cross = 104,
178b8e80941Smrg    Distance = 105,
179b8e80941Smrg    Length = 106,
180b8e80941Smrg    Normalize = 107,
181b8e80941Smrg    Fast_distance = 108,
182b8e80941Smrg    Fast_length = 109,
183b8e80941Smrg    Fast_normalize = 110,
184b8e80941Smrg
185b8e80941Smrg    // Section 2.5: Relational instructions
186b8e80941Smrg    Bitselect = 186,
187b8e80941Smrg    Select = 187,
188b8e80941Smrg
189b8e80941Smrg    // Section 2.6: Vector Data Load and Store instructions
190b8e80941Smrg    Vloadn = 171,
191b8e80941Smrg    Vstoren = 172,
192b8e80941Smrg    Vload_half = 173,
193b8e80941Smrg    Vload_halfn = 174,
194b8e80941Smrg    Vstore_half = 175,
195b8e80941Smrg    Vstore_half_r = 176,
196b8e80941Smrg    Vstore_halfn = 177,
197b8e80941Smrg    Vstore_halfn_r = 178,
198b8e80941Smrg    Vloada_halfn = 179,
199b8e80941Smrg    Vstorea_halfn = 180,
200b8e80941Smrg    Vstorea_halfn_r = 181,
201b8e80941Smrg
202b8e80941Smrg    // Section 2.7: Miscellaneous Vector instructions
203b8e80941Smrg    Shuffle = 182,
204b8e80941Smrg    Shuffle2 = 183,
205b8e80941Smrg
206b8e80941Smrg    // Section 2.8: Misc instructions
207b8e80941Smrg    Printf = 184,
208b8e80941Smrg    Prefetch = 185,
209b8e80941Smrg};
210b8e80941Smrg
211b8e80941Smrg#endif
212