215 im = 0x3825490000001100,
217 iM = 0x3825490000001101,
219 Im = 0x3825490000001102,
221 IM = 0x3825490000001103,
295 sq = 0x3825490000001400,
296 cb = 0x3825490000001401,
343 f = 0x3825490000001600,
344 fc = 0x3825490000001601,
360 t = 0x3825490000001700,
361 l = 0x3825490000001701,
389 f = 0x3825490000001900,
390 c = 0x3825490000001901,
391 r = 0x3825490000001902,
392 t = 0x3825490000001903,
503#define THORIN_math_NORMALIZER_IMPL \
504 void register_normalizers(Normalizers& normalizers) {\
505 normalizers[flags_t(arith::add)] = &normalize_arith<arith::add>; \
506 normalizers[flags_t(arith::sub)] = &normalize_arith<arith::sub>; \
507 normalizers[flags_t(arith::mul)] = &normalize_arith<arith::mul>; \
508 normalizers[flags_t(arith::div)] = &normalize_arith<arith::div>; \
509 normalizers[flags_t(arith::rem)] = &normalize_arith<arith::rem>; \
510 normalizers[flags_t(extrema::im)] = &normalize_extrema<extrema::im>; \
511 normalizers[flags_t(extrema::iM)] = &normalize_extrema<extrema::iM>; \
512 normalizers[flags_t(extrema::Im)] = &normalize_extrema<extrema::Im>; \
513 normalizers[flags_t(extrema::IM)] = &normalize_extrema<extrema::IM>; \
514 normalizers[flags_t(tri::ahff)] = &normalize_tri<tri::ahff>; \
515 normalizers[flags_t(tri::ahfF)] = &normalize_tri<tri::ahfF>; \
516 normalizers[flags_t(tri::ahFf)] = &normalize_tri<tri::ahFf>; \
517 normalizers[flags_t(tri::ahFF)] = &normalize_tri<tri::ahFF>; \
518 normalizers[flags_t(tri::aHff)] = &normalize_tri<tri::aHff>; \
519 normalizers[flags_t(tri::aHfF)] = &normalize_tri<tri::aHfF>; \
520 normalizers[flags_t(tri::aHFf)] = &normalize_tri<tri::aHFf>; \
521 normalizers[flags_t(tri::aHFF)] = &normalize_tri<tri::aHFF>; \
522 normalizers[flags_t(tri::Ahff)] = &normalize_tri<tri::Ahff>; \
523 normalizers[flags_t(tri::AhfF)] = &normalize_tri<tri::AhfF>; \
524 normalizers[flags_t(tri::AhFf)] = &normalize_tri<tri::AhFf>; \
525 normalizers[flags_t(tri::AhFF)] = &normalize_tri<tri::AhFF>; \
526 normalizers[flags_t(tri::AHff)] = &normalize_tri<tri::AHff>; \
527 normalizers[flags_t(tri::AHfF)] = &normalize_tri<tri::AHfF>; \
528 normalizers[flags_t(tri::AHFf)] = &normalize_tri<tri::AHFf>; \
529 normalizers[flags_t(tri::AHFF)] = &normalize_tri<tri::AHFF>; \
530 normalizers[flags_t(Annex::Base<pow>)] = &normalize_pow; \
531 normalizers[flags_t(rt::sq)] = &normalize_rt<rt::sq>; \
532 normalizers[flags_t(rt::cb)] = &normalize_rt<rt::cb>; \
533 normalizers[flags_t(exp::lbb)] = &normalize_exp<exp::lbb>; \
534 normalizers[flags_t(exp::lbB)] = &normalize_exp<exp::lbB>; \
535 normalizers[flags_t(exp::lBb)] = &normalize_exp<exp::lBb>; \
536 normalizers[flags_t(exp::lBB)] = &normalize_exp<exp::lBB>; \
537 normalizers[flags_t(exp::Lbb)] = &normalize_exp<exp::Lbb>; \
538 normalizers[flags_t(exp::LbB)] = &normalize_exp<exp::LbB>; \
539 normalizers[flags_t(exp::LBb)] = &normalize_exp<exp::LBb>; \
540 normalizers[flags_t(exp::LBB)] = &normalize_exp<exp::LBB>; \
541 normalizers[flags_t(er::f)] = &normalize_er<er::f>; \
542 normalizers[flags_t(er::fc)] = &normalize_er<er::fc>; \
543 normalizers[flags_t(gamma::t)] = &normalize_gamma<gamma::t>; \
544 normalizers[flags_t(gamma::l)] = &normalize_gamma<gamma::l>; \
545 normalizers[flags_t(Annex::Base<abs>)] = &normalize_abs; \
546 normalizers[flags_t(round::f)] = &normalize_round<round::f>; \
547 normalizers[flags_t(round::c)] = &normalize_round<round::c>; \
548 normalizers[flags_t(round::r)] = &normalize_round<round::r>; \
549 normalizers[flags_t(round::t)] = &normalize_round<round::t>; \
550 normalizers[flags_t(cmp::ugle)] = &normalize_cmp<cmp::ugle>; \
551 normalizers[flags_t(cmp::uglE)] = &normalize_cmp<cmp::uglE>; \
552 normalizers[flags_t(cmp::ugLe)] = &normalize_cmp<cmp::ugLe>; \
553 normalizers[flags_t(cmp::ugLE)] = &normalize_cmp<cmp::ugLE>; \
554 normalizers[flags_t(cmp::uGle)] = &normalize_cmp<cmp::uGle>; \
555 normalizers[flags_t(cmp::uGlE)] = &normalize_cmp<cmp::uGlE>; \
556 normalizers[flags_t(cmp::uGLe)] = &normalize_cmp<cmp::uGLe>; \
557 normalizers[flags_t(cmp::uGLE)] = &normalize_cmp<cmp::uGLE>; \
558 normalizers[flags_t(cmp::Ugle)] = &normalize_cmp<cmp::Ugle>; \
559 normalizers[flags_t(cmp::UglE)] = &normalize_cmp<cmp::UglE>; \
560 normalizers[flags_t(cmp::UgLe)] = &normalize_cmp<cmp::UgLe>; \
561 normalizers[flags_t(cmp::UgLE)] = &normalize_cmp<cmp::UgLE>; \
562 normalizers[flags_t(cmp::UGle)] = &normalize_cmp<cmp::UGle>; \
563 normalizers[flags_t(cmp::UGlE)] = &normalize_cmp<cmp::UGlE>; \
564 normalizers[flags_t(cmp::UGLe)] = &normalize_cmp<cmp::UGLe>; \
565 normalizers[flags_t(cmp::UGLE)] = &normalize_cmp<cmp::UGLE>; \
566 normalizers[flags_t(conv::s2f)] = &normalize_conv<conv::s2f>; \
567 normalizers[flags_t(conv::u2f)] = &normalize_conv<conv::u2f>; \
568 normalizers[flags_t(conv::f2s)] = &normalize_conv<conv::f2s>; \
569 normalizers[flags_t(conv::f2u)] = &normalize_conv<conv::f2u>; \
570 normalizers[flags_t(conv::f2f)] = &normalize_conv<conv::f2f>; \
638template<>
struct Axiom::Match<plug::
math::f16> {
using type =
Axiom; };
639template<>
struct Axiom::Match<plug::
math::f32> {
using type =
Axiom; };
640template<>
struct Axiom::Match<plug::
math::f64> {
using type =
Axiom; };
641template<>
struct Axiom::Match<plug::
math::bf16> {
using type =
Axiom; };
645template<>
struct Axiom::Match<plug::
math::F16> {
using type =
Axiom; };
646template<>
struct Axiom::Match<plug::
math::F32> {
using type =
Axiom; };
647template<>
struct Axiom::Match<plug::
math::F64> {
using type =
Axiom; };
648template<>
struct Axiom::Match<plug::
math::BF16> {
using type =
Axiom; };
653template<>
struct Axiom::Match<plug::
math::slf> {
using type =
Axiom; };
654template<>
struct Axiom::Match<plug::
math::sgn> {
using type =
Axiom; };
655template<>
struct Axiom::Match<plug::
math::rrt> {
using type =
Axiom; };
Helper class to retrieve Infer::arg if present.
Ref normalize_round(Ref type, Ref c, Ref arg)
Ref normalize_er(Ref type, Ref c, Ref arg)
Ref normalize_conv(Ref dst_t, Ref c, Ref x)
Ref normalize_exp(Ref type, Ref c, Ref arg)
Ref normalize_abs(Ref type, Ref c, Ref arg)
Ref normalize_rt(Ref type, Ref c, Ref arg)
Ref normalize_pow(Ref type, Ref c, Ref arg)
Ref normalize_arith(Ref type, Ref c, Ref arg)
Ref normalize_gamma(Ref type, Ref c, Ref arg)
Ref normalize_extrema(Ref type, Ref c, Ref arg)
static constexpr plugin_t Plugin_Id
void register_normalizers(Normalizers &normalizers)
Ref normalize_cmp(Ref type, Ref c, Ref arg)
Ref normalize_tri(Ref type, Ref c, Ref arg)
absl::flat_hash_map< flags_t, NormalizeFn > Normalizers
static constexpr flags_t Base
#define THORIN_ENUM_OPERATORS(E)
Use this to declare all kind of bit and comparison operators for an enum E.