Skip to main content

Module ops

Module ops 

Source
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.
ClampFOp
Clamps value to [min, max]: maxf(minf(value, max), min); poison when min > max.
CopySignOp
Magnitude of lhs with the sign of rhs.
CosOp
Cosine.
CoshOp
Hyperbolic cosine.
CountLeadingZerosOp
Counts leading zero bits.
CountTrailingZerosOp
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 + c with a single rounding.
IPowIOp
Signed integer power; negative exponents follow MLIR semantics.
IsFiniteOp
Tests for a finite value.
IsInfOp
Tests for positive or negative infinity.
IsNaNOp
Tests for NaN.
IsNormalOp
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.
RoundEvenOp
Rounds to nearest, ties to even.
RoundOp
Rounds to nearest, ties away from zero.
RsqrtOp
Reciprocal square root.
SinOp
Sine.
SincosOp
Computes the sine and cosine of one operand together.
SinhOp
Hyperbolic sine.
SqrtOp
Square root.
TanOp
Tangent.
TanhOp
Hyperbolic tangent.
TruncOp
Rounds toward zero.