Expand description
math operation definitions, builders, and verification.
new constructors allocate operations without verification and take the
result type from the first operand, except classification operations,
which produce i1 shaped like the operand. Use
pliron::common_traits::Verify::verify before consuming externally
supplied or manually edited IR.
Operand and result accessors assume the operation has its declared arity;
malformed IR can panic when an operand or result is missing. Fast-math flags
default to none when absent.
Structsยง
- AbsFOp
- Floating-point absolute value.
- AbsIOp
- Integer absolute value; the minimum value wraps.
- AcosOp
- Arccosine.
- AcoshOp
- Inverse hyperbolic cosine.
- AsinOp
- Arcsine.
- AsinhOp
- Inverse hyperbolic sine.
- Atan2Op
- Two-argument arctangent of
lhs / rhs. - AtanOp
- Arctangent.
- AtanhOp
- Inverse hyperbolic tangent.
- CbrtOp
- Cube root.
- CeilOp
- Rounds toward positive infinity.
- ClampF
Op - Clamps
valueto[min, max]:maxf(minf(value, max), min); poison whenmin > max. - Copy
Sign Op - Magnitude of
lhswith the sign ofrhs. - CosOp
- Cosine.
- CoshOp
- Hyperbolic cosine.
- Count
Leading Zeros Op - Counts leading zero bits.
- Count
Trailing Zeros Op - Counts trailing zero bits.
- CtPopOp
- Counts set bits.
- ErfOp
- Error function.
- ErfcOp
- Complementary error function.
- Exp2Op
- Base-2 exponential.
- ExpM1Op
exp(x) - 1, accurate near zero.- ExpOp
- Base-e exponential.
- FPowIOp
- Floating-point base raised to a signless-integer exponent.
- FloorOp
- Rounds toward negative infinity.
- FmaOp
- Fused multiply-add
a * b + cwith a single rounding. - IPowIOp
- Signed integer power; negative exponents follow MLIR semantics.
- IsFinite
Op - Tests for a finite value.
- IsInfOp
- Tests for positive or negative infinity.
- IsNaNOp
- Tests for NaN.
- IsNormal
Op - Tests for a normal (not subnormal) value.
- Log1pOp
log(1 + x), accurate near zero.- Log2Op
- Base-2 logarithm.
- Log10Op
- Base-10 logarithm.
- LogOp
- Natural logarithm.
- PowFOp
- Floating-point power.
- Round
Even Op - Rounds to nearest, ties to even.
- RoundOp
- Rounds to nearest, ties away from zero.
- RsqrtOp
- Reciprocal square root.
- SinOp
- Sine.
- Sincos
Op - Computes the sine and cosine of one operand together.
- SinhOp
- Hyperbolic sine.
- SqrtOp
- Square root.
- TanOp
- Tangent.
- TanhOp
- Hyperbolic tangent.
- TruncOp
- Rounds toward zero.