MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
autogen.h
Go to the documentation of this file.
1#pragma once
2
3#include <mim/axm.h>
4#include <mim/plugin.h>
5
6/// @namespace mim::plug::math @ref math
7namespace mim {
8namespace plug::math {
9
10static constexpr plugin_t Plugin_Id = 0x3825490000000000;
11
12/// @name %%math.F
13///@{
14enum class F : flags_t {
15};
16
17///@}
18
19/// @name %%math.f16
20///@{
21enum class f16 : flags_t {
22};
23
24///@}
25
26/// @name %%math.f32
27///@{
28enum class f32 : flags_t {
29};
30
31///@}
32
33/// @name %%math.f64
34///@{
35enum class f64 : flags_t {
36};
37
38///@}
39
40/// @name %%math.bf16
41///@{
42enum class bf16 : flags_t {
43};
44
45///@}
46
47/// @name %%math.nvtf32
48///@{
49enum class nvtf32 : flags_t {
50};
51
52///@}
53
54/// @name %%math.amdfp24
55///@{
56enum class amdfp24 : flags_t {
57};
58
59///@}
60
61/// @name %%math.pxr24
62///@{
63enum class pxr24 : flags_t {
64};
65
66///@}
67
68/// @name %%math.F16
69///@{
70enum class F16 : flags_t {
71};
72
73///@}
74
75/// @name %%math.F32
76///@{
77enum class F32 : flags_t {
78};
79
80///@}
81
82/// @name %%math.F64
83///@{
84enum class F64 : flags_t {
85};
86
87///@}
88
89/// @name %%math.BF16
90///@{
91enum class BF16 : flags_t {
92};
93
94///@}
95
96/// @name %%math.NVTF32
97///@{
98enum class NVTF32 : flags_t {
99};
100
101///@}
102
103/// @name %%math.AMDFP24
104///@{
105enum class AMDFP24 : flags_t {
106};
107
108///@}
109
110/// @name %%math.PXR24
111///@{
112enum class PXR24 : flags_t {
113};
114
115///@}
116
117/// @name %%math.mode
118///@{
119enum class mode : flags_t {
120 none = 0x3825490000000f00,
121 nnan = 0x3825490000000f01,
122 ninf = 0x3825490000000f02,
123 nsz = 0x3825490000000f03,
124 arcp = 0x3825490000000f04,
125 contract = 0x3825490000000f05,
126 afn = 0x3825490000000f06,
127 reassoc = 0x3825490000000f07,
128 finite = 0x3825490000000f08,
129 unsafe = 0x3825490000000f09,
130 fast = 0x3825490000000f0a,
131};
132
133///@}
134
135/// @name %%math.arith
136///@{
137enum class arith : flags_t {
138 add = 0x3825490000001000,
139 sub = 0x3825490000001001,
140 mul = 0x3825490000001002,
141 div = 0x3825490000001003,
142 rem = 0x3825490000001004,
143};
144
145template<arith>
146const Def* normalize_arith(const Def*, const Def*, const Def*);
147
148///@}
149
150/// @name %%math.minus
151///@{
152enum class minus : flags_t {
153};
154
155///@}
156
157/// @name %%math.extrema
158///@{
159enum class extrema : flags_t {
160 im = 0x3825490000001200,
161 fmin = 0x3825490000001200,
162 iM = 0x3825490000001201,
163 fmax = 0x3825490000001201,
164 Im = 0x3825490000001202,
165 ieee754min = 0x3825490000001202,
166 IM = 0x3825490000001203,
167 ieee754max = 0x3825490000001203,
168};
169
170template<extrema>
171const Def* normalize_extrema(const Def*, const Def*, const Def*);
172
173///@}
174
175/// @name %%math.tri
176///@{
177enum class tri : flags_t {
178 ahff = 0x3825490000001300,
179 sin = 0x3825490000001300,
180 ahfF = 0x3825490000001301,
181 cos = 0x3825490000001301,
182 ahFf = 0x3825490000001302,
183 tan = 0x3825490000001302,
184 ahFF = 0x3825490000001303,
185 aHff = 0x3825490000001304,
186 sinh = 0x3825490000001304,
187 h = 0x3825490000001304,
188 aHfF = 0x3825490000001305,
189 cosh = 0x3825490000001305,
190 aHFf = 0x3825490000001306,
191 tanh = 0x3825490000001306,
192 aHFF = 0x3825490000001307,
193 Ahff = 0x3825490000001308,
194 asin = 0x3825490000001308,
195 a = 0x3825490000001308,
196 AhfF = 0x3825490000001309,
197 acos = 0x3825490000001309,
198 AhFf = 0x382549000000130a,
199 atan = 0x382549000000130a,
200 AhFF = 0x382549000000130b,
201 AHff = 0x382549000000130c,
202 asinh = 0x382549000000130c,
203 AHfF = 0x382549000000130d,
204 acosh = 0x382549000000130d,
205 AHFf = 0x382549000000130e,
206 atanh = 0x382549000000130e,
207 AHFF = 0x382549000000130f,
208};
209
210template<tri>
211const Def* normalize_tri(const Def*, const Def*, const Def*);
212
213///@}
214
215/// @name %%math.pow
216///@{
217enum class pow : flags_t {
218};
219
220const Def* normalize_pow(const Def*, const Def*, const Def*);
221///@}
222
223/// @name %%math.rt
224///@{
225enum class rt : flags_t {
226 sq = 0x3825490000001500,
227 cb = 0x3825490000001501,
228};
229
230template<rt>
231const Def* normalize_rt(const Def*, const Def*, const Def*);
232
233///@}
234
235/// @name %%math.exp
236///@{
237enum class exp : flags_t {
238 lbb = 0x3825490000001600,
239 exp = 0x3825490000001600,
240 lbB = 0x3825490000001601,
241 exp2 = 0x3825490000001601,
242 bin = 0x3825490000001601,
243 lBb = 0x3825490000001602,
244 exp10 = 0x3825490000001602,
245 dec = 0x3825490000001602,
246 lBB = 0x3825490000001603,
247 Lbb = 0x3825490000001604,
248 log = 0x3825490000001604,
249 LbB = 0x3825490000001605,
250 log2 = 0x3825490000001605,
251 LBb = 0x3825490000001606,
252 log10 = 0x3825490000001606,
253 LBB = 0x3825490000001607,
254};
255
256template<exp>
257const Def* normalize_exp(const Def*, const Def*, const Def*);
258
259///@}
260
261/// @name %%math.er
262///@{
263enum class er : flags_t {
264 f = 0x3825490000001700,
265 fc = 0x3825490000001701,
266};
267
268template<er>
269const Def* normalize_er(const Def*, const Def*, const Def*);
270
271///@}
272
273/// @name %%math.gamma
274///@{
275enum class gamma : flags_t {
276 t = 0x3825490000001800,
277 l = 0x3825490000001801,
278};
279
280template<gamma>
281const Def* normalize_gamma(const Def*, const Def*, const Def*);
282
283///@}
284
285/// @name %%math.abs
286///@{
287enum class abs : flags_t {
288};
289
290const Def* normalize_abs(const Def*, const Def*, const Def*);
291///@}
292
293/// @name %%math.round
294///@{
295enum class round : flags_t {
296 f = 0x3825490000001a00,
297 c = 0x3825490000001a01,
298 r = 0x3825490000001a02,
299 t = 0x3825490000001a03,
300};
301
302template<round>
303const Def* normalize_round(const Def*, const Def*, const Def*);
304
305///@}
306
307/// @name %%math.cmp
308///@{
309enum class cmp : flags_t {
310 ugle = 0x3825490000001b00,
311 f = 0x3825490000001b00,
312 uglE = 0x3825490000001b01,
313 e = 0x3825490000001b01,
314 ugLe = 0x3825490000001b02,
315 l = 0x3825490000001b02,
316 ugLE = 0x3825490000001b03,
317 le = 0x3825490000001b03,
318 uGle = 0x3825490000001b04,
319 g = 0x3825490000001b04,
320 uGlE = 0x3825490000001b05,
321 ge = 0x3825490000001b05,
322 uGLe = 0x3825490000001b06,
323 ne = 0x3825490000001b06,
324 uGLE = 0x3825490000001b07,
325 o = 0x3825490000001b07,
326 Ugle = 0x3825490000001b08,
327 u = 0x3825490000001b08,
328 UglE = 0x3825490000001b09,
329 ue = 0x3825490000001b09,
330 UgLe = 0x3825490000001b0a,
331 ul = 0x3825490000001b0a,
332 UgLE = 0x3825490000001b0b,
333 ule = 0x3825490000001b0b,
334 UGle = 0x3825490000001b0c,
335 ug = 0x3825490000001b0c,
336 UGlE = 0x3825490000001b0d,
337 uge = 0x3825490000001b0d,
338 UGLe = 0x3825490000001b0e,
339 une = 0x3825490000001b0e,
340 UGLE = 0x3825490000001b0f,
341 t = 0x3825490000001b0f,
342};
343
344template<cmp>
345const Def* normalize_cmp(const Def*, const Def*, const Def*);
346
347///@}
348
349/// @name %%math.is_finite
350///@{
351enum class is_finite : flags_t {
352};
353
354///@}
355
356/// @name %%math.conv
357///@{
358enum class conv : flags_t {
359 s2f = 0x3825490000001d00,
360 u2f = 0x3825490000001d01,
361 f2s = 0x3825490000001d02,
362 f2u = 0x3825490000001d03,
363 f2f = 0x3825490000001d04,
364};
365
366template<conv>
367const Def* normalize_conv(const Def*, const Def*, const Def*);
368
369///@}
370
371/// @name %%math.slf
372///@{
373enum class slf : flags_t {
374};
375
376///@}
377
378/// @name %%math.sgn
379///@{
380enum class sgn : flags_t {
381};
382
383///@}
384
385/// @name %%math.rrt
386///@{
387enum class rrt : flags_t {
388};
389
390///@}
391
393
394#define MIM_math_NORMALIZER_IMPL \
395 void register_normalizers(Normalizers& normalizers) {\
396 normalizers[flags_t(arith::add)] = &normalize_arith<arith::add>; \
397 normalizers[flags_t(arith::sub)] = &normalize_arith<arith::sub>; \
398 normalizers[flags_t(arith::mul)] = &normalize_arith<arith::mul>; \
399 normalizers[flags_t(arith::div)] = &normalize_arith<arith::div>; \
400 normalizers[flags_t(arith::rem)] = &normalize_arith<arith::rem>; \
401 normalizers[flags_t(extrema::im)] = &normalize_extrema<extrema::im>; \
402 normalizers[flags_t(extrema::iM)] = &normalize_extrema<extrema::iM>; \
403 normalizers[flags_t(extrema::Im)] = &normalize_extrema<extrema::Im>; \
404 normalizers[flags_t(extrema::IM)] = &normalize_extrema<extrema::IM>; \
405 normalizers[flags_t(tri::ahff)] = &normalize_tri<tri::ahff>; \
406 normalizers[flags_t(tri::ahfF)] = &normalize_tri<tri::ahfF>; \
407 normalizers[flags_t(tri::ahFf)] = &normalize_tri<tri::ahFf>; \
408 normalizers[flags_t(tri::ahFF)] = &normalize_tri<tri::ahFF>; \
409 normalizers[flags_t(tri::aHff)] = &normalize_tri<tri::aHff>; \
410 normalizers[flags_t(tri::aHfF)] = &normalize_tri<tri::aHfF>; \
411 normalizers[flags_t(tri::aHFf)] = &normalize_tri<tri::aHFf>; \
412 normalizers[flags_t(tri::aHFF)] = &normalize_tri<tri::aHFF>; \
413 normalizers[flags_t(tri::Ahff)] = &normalize_tri<tri::Ahff>; \
414 normalizers[flags_t(tri::AhfF)] = &normalize_tri<tri::AhfF>; \
415 normalizers[flags_t(tri::AhFf)] = &normalize_tri<tri::AhFf>; \
416 normalizers[flags_t(tri::AhFF)] = &normalize_tri<tri::AhFF>; \
417 normalizers[flags_t(tri::AHff)] = &normalize_tri<tri::AHff>; \
418 normalizers[flags_t(tri::AHfF)] = &normalize_tri<tri::AHfF>; \
419 normalizers[flags_t(tri::AHFf)] = &normalize_tri<tri::AHFf>; \
420 normalizers[flags_t(tri::AHFF)] = &normalize_tri<tri::AHFF>; \
421 normalizers[flags_t(Annex::Base<pow>)] = &normalize_pow; \
422 normalizers[flags_t(rt::sq)] = &normalize_rt<rt::sq>; \
423 normalizers[flags_t(rt::cb)] = &normalize_rt<rt::cb>; \
424 normalizers[flags_t(exp::lbb)] = &normalize_exp<exp::lbb>; \
425 normalizers[flags_t(exp::lbB)] = &normalize_exp<exp::lbB>; \
426 normalizers[flags_t(exp::lBb)] = &normalize_exp<exp::lBb>; \
427 normalizers[flags_t(exp::lBB)] = &normalize_exp<exp::lBB>; \
428 normalizers[flags_t(exp::Lbb)] = &normalize_exp<exp::Lbb>; \
429 normalizers[flags_t(exp::LbB)] = &normalize_exp<exp::LbB>; \
430 normalizers[flags_t(exp::LBb)] = &normalize_exp<exp::LBb>; \
431 normalizers[flags_t(exp::LBB)] = &normalize_exp<exp::LBB>; \
432 normalizers[flags_t(er::f)] = &normalize_er<er::f>; \
433 normalizers[flags_t(er::fc)] = &normalize_er<er::fc>; \
434 normalizers[flags_t(gamma::t)] = &normalize_gamma<gamma::t>; \
435 normalizers[flags_t(gamma::l)] = &normalize_gamma<gamma::l>; \
436 normalizers[flags_t(Annex::Base<abs>)] = &normalize_abs; \
437 normalizers[flags_t(round::f)] = &normalize_round<round::f>; \
438 normalizers[flags_t(round::c)] = &normalize_round<round::c>; \
439 normalizers[flags_t(round::r)] = &normalize_round<round::r>; \
440 normalizers[flags_t(round::t)] = &normalize_round<round::t>; \
441 normalizers[flags_t(cmp::ugle)] = &normalize_cmp<cmp::ugle>; \
442 normalizers[flags_t(cmp::uglE)] = &normalize_cmp<cmp::uglE>; \
443 normalizers[flags_t(cmp::ugLe)] = &normalize_cmp<cmp::ugLe>; \
444 normalizers[flags_t(cmp::ugLE)] = &normalize_cmp<cmp::ugLE>; \
445 normalizers[flags_t(cmp::uGle)] = &normalize_cmp<cmp::uGle>; \
446 normalizers[flags_t(cmp::uGlE)] = &normalize_cmp<cmp::uGlE>; \
447 normalizers[flags_t(cmp::uGLe)] = &normalize_cmp<cmp::uGLe>; \
448 normalizers[flags_t(cmp::uGLE)] = &normalize_cmp<cmp::uGLE>; \
449 normalizers[flags_t(cmp::Ugle)] = &normalize_cmp<cmp::Ugle>; \
450 normalizers[flags_t(cmp::UglE)] = &normalize_cmp<cmp::UglE>; \
451 normalizers[flags_t(cmp::UgLe)] = &normalize_cmp<cmp::UgLe>; \
452 normalizers[flags_t(cmp::UgLE)] = &normalize_cmp<cmp::UgLE>; \
453 normalizers[flags_t(cmp::UGle)] = &normalize_cmp<cmp::UGle>; \
454 normalizers[flags_t(cmp::UGlE)] = &normalize_cmp<cmp::UGlE>; \
455 normalizers[flags_t(cmp::UGLe)] = &normalize_cmp<cmp::UGLe>; \
456 normalizers[flags_t(cmp::UGLE)] = &normalize_cmp<cmp::UGLE>; \
457 normalizers[flags_t(conv::s2f)] = &normalize_conv<conv::s2f>; \
458 normalizers[flags_t(conv::u2f)] = &normalize_conv<conv::u2f>; \
459 normalizers[flags_t(conv::f2s)] = &normalize_conv<conv::f2s>; \
460 normalizers[flags_t(conv::f2u)] = &normalize_conv<conv::f2u>; \
461 normalizers[flags_t(conv::f2f)] = &normalize_conv<conv::f2f>; \
462 }
463} // namespace plug::math
464
465#ifndef DOXYGEN // don't include in Doxygen documentation
466
467template<> constexpr flags_t Annex::Base<plug::math::F> = 0x3825490000000000;
468template<> constexpr size_t Annex::Num<plug::math::F> = 0;
469template<> constexpr flags_t Annex::Base<plug::math::f16> = 0x3825490000000100;
470template<> constexpr size_t Annex::Num<plug::math::f16> = 0;
471template<> constexpr flags_t Annex::Base<plug::math::f32> = 0x3825490000000200;
472template<> constexpr size_t Annex::Num<plug::math::f32> = 0;
473template<> constexpr flags_t Annex::Base<plug::math::f64> = 0x3825490000000300;
474template<> constexpr size_t Annex::Num<plug::math::f64> = 0;
475template<> constexpr flags_t Annex::Base<plug::math::bf16> = 0x3825490000000400;
476template<> constexpr size_t Annex::Num<plug::math::bf16> = 0;
477template<> constexpr flags_t Annex::Base<plug::math::nvtf32> = 0x3825490000000500;
478template<> constexpr size_t Annex::Num<plug::math::nvtf32> = 0;
479template<> constexpr flags_t Annex::Base<plug::math::amdfp24> = 0x3825490000000600;
480template<> constexpr size_t Annex::Num<plug::math::amdfp24> = 0;
481template<> constexpr flags_t Annex::Base<plug::math::pxr24> = 0x3825490000000700;
482template<> constexpr size_t Annex::Num<plug::math::pxr24> = 0;
483template<> constexpr flags_t Annex::Base<plug::math::F16> = 0x3825490000000800;
484template<> constexpr size_t Annex::Num<plug::math::F16> = 0;
485template<> constexpr flags_t Annex::Base<plug::math::F32> = 0x3825490000000900;
486template<> constexpr size_t Annex::Num<plug::math::F32> = 0;
487template<> constexpr flags_t Annex::Base<plug::math::F64> = 0x3825490000000a00;
488template<> constexpr size_t Annex::Num<plug::math::F64> = 0;
489template<> constexpr flags_t Annex::Base<plug::math::BF16> = 0x3825490000000b00;
490template<> constexpr size_t Annex::Num<plug::math::BF16> = 0;
491template<> constexpr flags_t Annex::Base<plug::math::NVTF32> = 0x3825490000000c00;
492template<> constexpr size_t Annex::Num<plug::math::NVTF32> = 0;
493template<> constexpr flags_t Annex::Base<plug::math::AMDFP24> = 0x3825490000000d00;
494template<> constexpr size_t Annex::Num<plug::math::AMDFP24> = 0;
495template<> constexpr flags_t Annex::Base<plug::math::PXR24> = 0x3825490000000e00;
496template<> constexpr size_t Annex::Num<plug::math::PXR24> = 0;
497template<> constexpr flags_t Annex::Base<plug::math::mode> = 0x3825490000000f00;
498template<> constexpr size_t Annex::Num<plug::math::mode> = 11;
499template<> constexpr flags_t Annex::Base<plug::math::arith> = 0x3825490000001000;
500template<> constexpr size_t Annex::Num<plug::math::arith> = 5;
501template<> constexpr flags_t Annex::Base<plug::math::minus> = 0x3825490000001100;
502template<> constexpr size_t Annex::Num<plug::math::minus> = 0;
503template<> constexpr flags_t Annex::Base<plug::math::extrema> = 0x3825490000001200;
504template<> constexpr size_t Annex::Num<plug::math::extrema> = 4;
505template<> constexpr flags_t Annex::Base<plug::math::tri> = 0x3825490000001300;
506template<> constexpr size_t Annex::Num<plug::math::tri> = 16;
507template<> constexpr flags_t Annex::Base<plug::math::pow> = 0x3825490000001400;
508template<> constexpr size_t Annex::Num<plug::math::pow> = 0;
509template<> constexpr flags_t Annex::Base<plug::math::rt> = 0x3825490000001500;
510template<> constexpr size_t Annex::Num<plug::math::rt> = 2;
511template<> constexpr flags_t Annex::Base<plug::math::exp> = 0x3825490000001600;
512template<> constexpr size_t Annex::Num<plug::math::exp> = 8;
513template<> constexpr flags_t Annex::Base<plug::math::er> = 0x3825490000001700;
514template<> constexpr size_t Annex::Num<plug::math::er> = 2;
515template<> constexpr flags_t Annex::Base<plug::math::gamma> = 0x3825490000001800;
516template<> constexpr size_t Annex::Num<plug::math::gamma> = 2;
517template<> constexpr flags_t Annex::Base<plug::math::abs> = 0x3825490000001900;
518template<> constexpr size_t Annex::Num<plug::math::abs> = 0;
519template<> constexpr flags_t Annex::Base<plug::math::round> = 0x3825490000001a00;
520template<> constexpr size_t Annex::Num<plug::math::round> = 4;
521template<> constexpr flags_t Annex::Base<plug::math::cmp> = 0x3825490000001b00;
522template<> constexpr size_t Annex::Num<plug::math::cmp> = 16;
523template<> constexpr flags_t Annex::Base<plug::math::is_finite> = 0x3825490000001c00;
524template<> constexpr size_t Annex::Num<plug::math::is_finite> = 0;
525template<> constexpr flags_t Annex::Base<plug::math::conv> = 0x3825490000001d00;
526template<> constexpr size_t Annex::Num<plug::math::conv> = 5;
527template<> constexpr flags_t Annex::Base<plug::math::slf> = 0x3825490000001e00;
528template<> constexpr size_t Annex::Num<plug::math::slf> = 0;
529template<> constexpr flags_t Annex::Base<plug::math::sgn> = 0x3825490000001f00;
530template<> constexpr size_t Annex::Num<plug::math::sgn> = 0;
531template<> constexpr flags_t Annex::Base<plug::math::rrt> = 0x3825490000002000;
532template<> constexpr size_t Annex::Num<plug::math::rrt> = 0;
533
534template<> struct Axm::IsANode<plug::math::f16> { using type = Axm; };
535template<> struct Axm::IsANode<plug::math::f32> { using type = Axm; };
536template<> struct Axm::IsANode<plug::math::f64> { using type = Axm; };
537template<> struct Axm::IsANode<plug::math::bf16> { using type = Axm; };
538template<> struct Axm::IsANode<plug::math::nvtf32> { using type = Axm; };
539template<> struct Axm::IsANode<plug::math::amdfp24> { using type = Axm; };
540template<> struct Axm::IsANode<plug::math::pxr24> { using type = Axm; };
541template<> struct Axm::IsANode<plug::math::F16> { using type = Axm; };
542template<> struct Axm::IsANode<plug::math::F32> { using type = Axm; };
543template<> struct Axm::IsANode<plug::math::F64> { using type = Axm; };
544template<> struct Axm::IsANode<plug::math::BF16> { using type = Axm; };
545template<> struct Axm::IsANode<plug::math::NVTF32> { using type = Axm; };
546template<> struct Axm::IsANode<plug::math::AMDFP24> { using type = Axm; };
547template<> struct Axm::IsANode<plug::math::PXR24> { using type = Axm; };
548template<> struct Axm::IsANode<plug::math::mode> { using type = Axm; };
549template<> struct Axm::IsANode<plug::math::minus> { using type = Axm; };
550template<> struct Axm::IsANode<plug::math::slf> { using type = Axm; };
551template<> struct Axm::IsANode<plug::math::sgn> { using type = Axm; };
552template<> struct Axm::IsANode<plug::math::rrt> { using type = Axm; };
553
554#endif
555} // namespace mim
556
557#ifndef DOXYGEN // don't include in Doxygen documentation
558
559template<> struct fe::is_bit_enum<mim::plug::math::mode> : std::true_type {};
560template<> struct fe::is_bit_enum<mim::plug::math::arith> : std::true_type {};
561template<> struct fe::is_bit_enum<mim::plug::math::extrema> : std::true_type {};
562template<> struct fe::is_bit_enum<mim::plug::math::tri> : std::true_type {};
563template<> struct fe::is_bit_enum<mim::plug::math::rt> : std::true_type {};
564template<> struct fe::is_bit_enum<mim::plug::math::exp> : std::true_type {};
565template<> struct fe::is_bit_enum<mim::plug::math::er> : std::true_type {};
566template<> struct fe::is_bit_enum<mim::plug::math::gamma> : std::true_type {};
567template<> struct fe::is_bit_enum<mim::plug::math::round> : std::true_type {};
568template<> struct fe::is_bit_enum<mim::plug::math::cmp> : std::true_type {};
569template<> struct fe::is_bit_enum<mim::plug::math::conv> : std::true_type {};
570
571#endif
Base class for all Defs.
Definition def.h:273
The math Plugin
Definition math.h:8
static constexpr plugin_t Plugin_Id
Definition autogen.h:10
const Def * normalize_extrema(const Def *type, const Def *c, const Def *arg)
const Def * normalize_er(const Def *type, const Def *, const Def *arg)
const Def * normalize_cmp(const Def *type, const Def *c, const Def *arg)
const Def * normalize_abs(const Def *type, const Def *, const Def *arg)
const Def * normalize_gamma(const Def *type, const Def *, const Def *arg)
@ arcp
Allow Reciprocal.
Definition math.h:25
@ fast
All flags.
Definition math.h:35
@ afn
Approximate functions.
Definition math.h:29
@ ninf
No Infs.
Definition math.h:20
@ unsafe
Mode::nsz | Mode::arcp | Mode::reassoc.
Definition math.h:34
@ contract
Allow floating-point contraction (e.g.
Definition math.h:27
@ nsz
No Signed Zeros.
Definition math.h:23
@ nnan
No NaNs.
Definition math.h:17
@ finite
Mode::nnan | Mode::ninf.
Definition math.h:33
void register_normalizers(Normalizers &normalizers)
const Def * normalize_arith(const Def *type, const Def *c, const Def *arg)
const Def * normalize_round(const Def *type, const Def *, const Def *arg)
const Def * normalize_tri(const Def *type, const Def *, const Def *arg)
const Def * normalize_exp(const Def *type, const Def *, const Def *arg)
const Def * normalize_rt(const Def *type, const Def *, const Def *arg)
const Def * normalize_pow(const Def *type, const Def *, const Def *arg)
const Def * normalize_conv(const Def *dst_t, const Def *, const Def *x)
Definition ast.h:16
u64 flags_t
Definition types.h:39
float rem(float a, float b)
Definition types.h:87
absl::flat_hash_map< flags_t, NormalizeFn > Normalizers
Definition plugin.h:27
u64 plugin_t
Definition types.h:40
@ Axm
Definition def.h:122
static constexpr size_t Num
Number of Axm::subtags.
Definition plugin.h:247
static constexpr flags_t Base
Definition plugin.h:248