Enumerations | |
<tt>math.F</tt> | |
| enum class | F : flags_t |
<tt>math.f16</tt> | |
| enum class | f16 : flags_t |
| enum class | F16 : flags_t |
<tt>math.f32</tt> | |
| enum class | f32 : flags_t |
| enum class | F32 : flags_t |
<tt>math.f64</tt> | |
| enum class | f64 : flags_t |
| enum class | F64 : flags_t |
<tt>math.bf16</tt> | |
| enum class | bf16 : flags_t |
| enum class | BF16 : flags_t |
<tt>math.nvtf32</tt> | |
| enum class | nvtf32 : flags_t |
| enum class | NVTF32 : flags_t |
<tt>math.amdfp24</tt> | |
| enum class | amdfp24 : flags_t |
| enum class | AMDFP24 : flags_t |
<tt>math.pxr24</tt> | |
| enum class | pxr24 : flags_t |
| enum class | PXR24 : flags_t |
<tt>math.mode</tt> | |
| enum class | mode : flags_t { none = 0x3825490000000f00 , nnan = 0x3825490000000f01 , ninf = 0x3825490000000f02 , nsz = 0x3825490000000f03 , arcp = 0x3825490000000f04 , contract = 0x3825490000000f05 , afn = 0x3825490000000f06 , reassoc = 0x3825490000000f07 , finite = 0x3825490000000f08 , unsafe = 0x3825490000000f09 , fast = 0x3825490000000f0a } |
<tt>math.minus</tt> | |
| enum class | minus : flags_t |
<tt>math.is_finite</tt> | |
| enum class | is_finite : flags_t |
<tt>math.inf</tt> | |
| enum class | inf : flags_t |
<tt>math.neg_inf</tt> | |
| enum class | neg_inf : flags_t |
<tt>math.nan</tt> | |
| enum class | nan : flags_t |
<tt>math.slf</tt> | |
| enum class | slf : flags_t |
<tt>math.sgn</tt> | |
| enum class | sgn : flags_t |
<tt>math.rrt</tt> | |
| enum class | rrt : flags_t |
Functions | |
| void | register_normalizers (Normalizers &normalizers) |
math.F | |
| std::optional< nat_t > | isa_f (const Def *def) |
| const Lit * | lit_f (World &w, std::floating_point auto val) |
| const Lit * | lit_f (World &w, nat_t width, mim::f64 val) |
Variables | |
| static constexpr plugin_t | Plugin_Id = 0x3825490000000000 |
Mode | |
| enum class | Mode : nat_t { top = 0 , none = top , nnan = 1 << 0 , ninf = 1 << 1 , nsz = 1 << 2 , arcp = 1 << 3 , contract = 1 << 4 , afn = 1 << 5 , reassoc = 1 << 6 , finite = nnan | ninf , unsafe = nsz | arcp | reassoc , fast , bot = fast } |
| Allowed optimizations for a specific operation. More... | |
| using | VMode = std::variant<Mode, nat_t, const Def*> |
| Give Mode as mim::plug::math::Mode, mim::nat_t or const Def*. | |
| const Def * | mode (World &w, VMode m) |
| mim::plug::math::VMode -> const Def*. | |
<tt>math.arith</tt> | |
| enum class | arith : flags_t { add = 0x3825490000001000 , sub = 0x3825490000001001 , mul = 0x3825490000001002 , div = 0x3825490000001003 , rem = 0x3825490000001004 } |
| template<arith id> | |
| const Def * | normalize_arith (const Def *type, const Def *c, const Def *arg) |
<tt>math.extrema</tt> | |
| enum class | extrema : flags_t { im = 0x3825490000001200 , fmin = 0x3825490000001200 , iM = 0x3825490000001201 , fmax = 0x3825490000001201 , Im = 0x3825490000001202 , ieee754min = 0x3825490000001202 , IM = 0x3825490000001203 , ieee754max = 0x3825490000001203 } |
| template<extrema id> | |
| const Def * | normalize_extrema (const Def *type, const Def *c, const Def *arg) |
<tt>math.tri</tt> | |
| enum class | tri : flags_t { ahff = 0x3825490000001300 , sin = 0x3825490000001300 , ahfF = 0x3825490000001301 , cos = 0x3825490000001301 , ahFf = 0x3825490000001302 , tan = 0x3825490000001302 , ahFF = 0x3825490000001303 , aHff = 0x3825490000001304 , sinh = 0x3825490000001304 , h = 0x3825490000001304 , aHfF = 0x3825490000001305 , cosh = 0x3825490000001305 , aHFf = 0x3825490000001306 , tanh = 0x3825490000001306 , aHFF = 0x3825490000001307 , Ahff = 0x3825490000001308 , asin = 0x3825490000001308 , a = 0x3825490000001308 , AhfF = 0x3825490000001309 , acos = 0x3825490000001309 , AhFf = 0x382549000000130a , atan = 0x382549000000130a , AhFF = 0x382549000000130b , AHff = 0x382549000000130c , asinh = 0x382549000000130c , AHfF = 0x382549000000130d , acosh = 0x382549000000130d , AHFf = 0x382549000000130e , atanh = 0x382549000000130e , AHFF = 0x382549000000130f } |
| template<tri id> | |
| const Def * | normalize_tri (const Def *type, const Def *, const Def *arg) |
<tt>math.pow</tt> | |
| enum class | pow : flags_t |
| const Def * | normalize_pow (const Def *type, const Def *, const Def *arg) |
<tt>math.rt</tt> | |
| enum class | rt : flags_t { sq = 0x3825490000001500 , cb = 0x3825490000001501 } |
| template<rt id> | |
| const Def * | normalize_rt (const Def *type, const Def *, const Def *arg) |
<tt>math.exp</tt> | |
| enum class | exp : flags_t { lbb = 0x3825490000001600 , exp = 0x3825490000001600 , lbB = 0x3825490000001601 , exp2 = 0x3825490000001601 , bin = 0x3825490000001601 , lBb = 0x3825490000001602 , exp10 = 0x3825490000001602 , dec = 0x3825490000001602 , lBB = 0x3825490000001603 , Lbb = 0x3825490000001604 , log = 0x3825490000001604 , LbB = 0x3825490000001605 , log2 = 0x3825490000001605 , LBb = 0x3825490000001606 , log10 = 0x3825490000001606 , LBB = 0x3825490000001607 } |
| template<exp id> | |
| const Def * | normalize_exp (const Def *type, const Def *, const Def *arg) |
<tt>math.er</tt> | |
| enum class | er : flags_t { f = 0x3825490000001700 , fc = 0x3825490000001701 } |
| template<er id> | |
| const Def * | normalize_er (const Def *type, const Def *, const Def *arg) |
<tt>math.gamma</tt> | |
| enum class | gamma : flags_t { t = 0x3825490000001800 , l = 0x3825490000001801 } |
| template<gamma id> | |
| const Def * | normalize_gamma (const Def *type, const Def *, const Def *arg) |
<tt>math.abs</tt> | |
| enum class | abs : flags_t |
| const Def * | normalize_abs (const Def *type, const Def *, const Def *arg) |
<tt>math.round</tt> | |
| enum class | round : flags_t { f = 0x3825490000001a00 , c = 0x3825490000001a01 , r = 0x3825490000001a02 , t = 0x3825490000001a03 } |
| template<round id> | |
| const Def * | normalize_round (const Def *type, const Def *, const Def *arg) |
<tt>math.cmp</tt> | |
| enum class | cmp : flags_t { ugle = 0x3825490000001b00 , f = 0x3825490000001b00 , uglE = 0x3825490000001b01 , e = 0x3825490000001b01 , ugLe = 0x3825490000001b02 , l = 0x3825490000001b02 , ugLE = 0x3825490000001b03 , le = 0x3825490000001b03 , uGle = 0x3825490000001b04 , g = 0x3825490000001b04 , uGlE = 0x3825490000001b05 , ge = 0x3825490000001b05 , uGLe = 0x3825490000001b06 , ne = 0x3825490000001b06 , uGLE = 0x3825490000001b07 , o = 0x3825490000001b07 , Ugle = 0x3825490000001b08 , u = 0x3825490000001b08 , UglE = 0x3825490000001b09 , ue = 0x3825490000001b09 , UgLe = 0x3825490000001b0a , ul = 0x3825490000001b0a , UgLE = 0x3825490000001b0b , ule = 0x3825490000001b0b , UGle = 0x3825490000001b0c , ug = 0x3825490000001b0c , UGlE = 0x3825490000001b0d , uge = 0x3825490000001b0d , UGLe = 0x3825490000001b0e , une = 0x3825490000001b0e , UGLE = 0x3825490000001b0f , t = 0x3825490000001b0f } |
| template<cmp id> | |
| const Def * | normalize_cmp (const Def *type, const Def *c, const Def *arg) |
<tt>math.conv</tt> | |
| enum class | conv : flags_t { s2f = 0x3825490000001d00 , u2f = 0x3825490000001d01 , f2s = 0x3825490000001d02 , f2u = 0x3825490000001d03 , f2f = 0x3825490000001d04 } |
| template<conv id> | |
| const Def * | normalize_conv (const Def *dst_t, const Def *, const Def *x) |
| using mim::plug::math::VMode = std::variant<Mode, nat_t, const Def*> |
Give Mode as mim::plug::math::Mode, mim::nat_t or const Def*.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Allowed optimizations for a specific operation.
| Enumerator | |
|---|---|
| top | |
| none | Alias for Mode::none. |
| nnan | No NaNs. Allow optimizations to assume the arguments and result are not NaN. Such optimizations are required to retain defined behavior over NaNs, but the value of the result is undefined. |
| ninf | No Infs. Allow optimizations to assume the arguments and result are not +/-Inf. Such optimizations are required to retain defined behavior over +/-Inf, but the value of the result is undefined. |
| nsz | No Signed Zeros. Allow optimizations to treat the sign of a zero argument or result as insignificant. |
| arcp | Allow Reciprocal. Allow optimizations to use the reciprocal of an argument rather than perform division. |
| contract | Allow floating-point contraction (e.g. fusing a multiply followed by an addition into a fused multiply-and-add). |
| afn | Approximate functions. Allow substitution of approximate calculations for functions (sin, log, sqrt, etc). |
| reassoc | Allow reassociation transformations for floating-point operations. This may dramatically change results in floating point. |
| finite | |
| unsafe | |
| fast | All flags. |
| bot | Alias for Mode::fast. |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Definition at line 55 of file math.h.
References mim::Axm::isa(), and isa_f().
Referenced by isa_f(), normalize_arith(), normalize_conv(), and mim::plug::core::normalize_trait().
|
inline |
mim::plug::math::VMode -> const Def*.
Definition at line 517 of file normalizers.cpp.
References normalize_abs().
Referenced by normalize_abs().
| const Def * mim::plug::math::normalize_arith | ( | const Def * | type, |
| const Def * | c, | ||
| const Def * | arg ) |
Definition at line 343 of file normalizers.cpp.
References add, c, div, fast, mim::Lit::isa(), isa_f(), lit_f(), mul, normalize_arith(), mim::Def::projs(), rem, and sub.
Referenced by normalize_arith().
| const Def * mim::plug::math::normalize_cmp | ( | const Def * | type, |
| const Def * | c, | ||
| const Def * | arg ) |
Definition at line 475 of file normalizers.cpp.
References c, f, normalize_cmp(), mim::Def::projs(), and t.
Referenced by normalize_cmp().
| const Def * mim::plug::math::normalize_conv | ( | const Def * | dst_t, |
| const Def * | , | ||
| const Def * | x ) |
Definition at line 488 of file normalizers.cpp.
References mim::App::arg(), f2f, f2s, f2u, mim::Lit::isa(), isa_f(), normalize_conv(), s2f, mim::Idx::size2bitwidth(), mim::Def::type(), u2f, and mim::Def::world().
Referenced by normalize_conv().
| const Def * mim::plug::math::normalize_er | ( | const Def * | type, |
| const Def * | , | ||
| const Def * | arg ) |
Definition at line 461 of file normalizers.cpp.
References normalize_er().
Referenced by normalize_er().
| const Def * mim::plug::math::normalize_exp | ( | const Def * | type, |
| const Def * | , | ||
| const Def * | arg ) |
Definition at line 454 of file normalizers.cpp.
References normalize_exp().
Referenced by normalize_exp().
| const Def * mim::plug::math::normalize_extrema | ( | const Def * | type, |
| const Def * | c, | ||
| const Def * | arg ) |
Definition at line 412 of file normalizers.cpp.
References c, fmax, fmin, ieee754max, ieee754min, mim::Lit::isa(), nnan, normalize_extrema(), nsz, and mim::Def::projs().
Referenced by normalize_extrema().
| const Def * mim::plug::math::normalize_gamma | ( | const Def * | type, |
| const Def * | , | ||
| const Def * | arg ) |
Definition at line 468 of file normalizers.cpp.
References normalize_gamma().
Referenced by normalize_gamma().
Definition at line 439 of file normalizers.cpp.
References normalize_pow(), and mim::Def::projs().
Referenced by normalize_pow().
| const Def * mim::plug::math::normalize_round | ( | const Def * | type, |
| const Def * | , | ||
| const Def * | arg ) |
Definition at line 524 of file normalizers.cpp.
References normalize_round().
Referenced by normalize_round().
| const Def * mim::plug::math::normalize_rt | ( | const Def * | type, |
| const Def * | , | ||
| const Def * | arg ) |
Definition at line 447 of file normalizers.cpp.
References normalize_rt().
Referenced by normalize_rt().
| const Def * mim::plug::math::normalize_tri | ( | const Def * | type, |
| const Def * | , | ||
| const Def * | arg ) |
Definition at line 433 of file normalizers.cpp.
References normalize_tri().
Referenced by normalize_tri().
| void mim::plug::math::register_normalizers | ( | Normalizers & | normalizers | ) |
References register_normalizers().
Referenced by MIM_PLUGIN_ENTRY(), and register_normalizers().