tvm_tirx::ir::prim::op

Trait PrimOps

Source
pub trait PrimOps {
Show 66 methods // Required method fn to_expr_result(&self) -> ExprResult; // Provided methods fn less(&self, rhs: impl Operand) -> ExprResult { ... } fn less_equal(&self, rhs: impl Operand) -> ExprResult { ... } fn greater(&self, rhs: impl Operand) -> ExprResult { ... } fn greater_equal(&self, rhs: impl Operand) -> ExprResult { ... } fn equal(&self, rhs: impl Operand) -> ExprResult { ... } fn not_equal(&self, rhs: impl Operand) -> ExprResult { ... } fn logical_and(&self, rhs: impl IntoExpr) -> ExprResult { ... } fn logical_or(&self, rhs: impl IntoExpr) -> ExprResult { ... } fn div(&self, rhs: impl Operand) -> ExprResult { ... } fn truncdiv(&self, rhs: impl Operand) -> ExprResult { ... } fn truncmod(&self, rhs: impl Operand) -> ExprResult { ... } fn floordiv(&self, rhs: impl Operand) -> ExprResult { ... } fn floormod(&self, rhs: impl Operand) -> ExprResult { ... } fn indexdiv(&self, rhs: impl Operand) -> ExprResult { ... } fn indexmod(&self, rhs: impl Operand) -> ExprResult { ... } fn ceildiv(&self, rhs: impl Operand) -> ExprResult { ... } fn min(&self, rhs: impl Operand) -> ExprResult { ... } fn max(&self, rhs: impl Operand) -> ExprResult { ... } fn pow(&self, rhs: impl IntoExpr) -> ExprResult { ... } fn fmod(&self, rhs: impl IntoExpr) -> ExprResult { ... } fn atan2(&self, rhs: impl IntoExpr) -> ExprResult { ... } fn nextafter(&self, rhs: impl IntoExpr) -> ExprResult { ... } fn copysign(&self, rhs: impl IntoExpr) -> ExprResult { ... } fn hypot(&self, rhs: impl IntoExpr) -> ExprResult { ... } fn ldexp(&self, rhs: impl IntoExpr) -> ExprResult { ... } fn bitwise_not(&self) -> ExprResult { ... } fn floor(&self) -> ExprResult { ... } fn ceil(&self) -> ExprResult { ... } fn round(&self) -> ExprResult { ... } fn nearbyint(&self) -> ExprResult { ... } fn trunc(&self) -> ExprResult { ... } fn abs(&self) -> ExprResult { ... } fn isnan(&self) -> ExprResult { ... } fn isinf(&self) -> ExprResult { ... } fn isfinite(&self) -> ExprResult { ... } fn likely(&self) -> ExprResult { ... } fn assume(&self) -> ExprResult { ... } fn clz(&self) -> ExprResult { ... } fn exp(&self) -> ExprResult { ... } fn exp2(&self) -> ExprResult { ... } fn exp10(&self) -> ExprResult { ... } fn erf(&self) -> ExprResult { ... } fn sigmoid(&self) -> ExprResult { ... } fn sqrt(&self) -> ExprResult { ... } fn rsqrt(&self) -> ExprResult { ... } fn log(&self) -> ExprResult { ... } fn log2(&self) -> ExprResult { ... } fn log10(&self) -> ExprResult { ... } fn log1p(&self) -> ExprResult { ... } fn popcount(&self) -> ExprResult { ... } fn tanh(&self) -> ExprResult { ... } fn tan(&self) -> ExprResult { ... } fn cos(&self) -> ExprResult { ... } fn cosh(&self) -> ExprResult { ... } fn sin(&self) -> ExprResult { ... } fn sinh(&self) -> ExprResult { ... } fn asin(&self) -> ExprResult { ... } fn acos(&self) -> ExprResult { ... } fn atan(&self) -> ExprResult { ... } fn acosh(&self) -> ExprResult { ... } fn asinh(&self) -> ExprResult { ... } fn atanh(&self) -> ExprResult { ... } fn cast(&self, ty: impl Into<PrimType>) -> ExprResult { ... } fn if_then_else(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult { ... } fn select(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult { ... }
}
Expand description

The C++ PrimExpr operations that are functions rather than Rust operators, as methods of an ExprResult or an expression handle. Each takes an expression or a literal on the right, typed as for the operators, and leaves self usable; the comparisons are named after the C++ functions (less, equal), since Rust’s eq and lt return a bool.

Required Methods§

Source

fn to_expr_result(&self) -> ExprResult

This expression as an ExprResult (a reference-count increment).

Provided Methods§

Source

fn less(&self, rhs: impl Operand) -> ExprResult

C++ a < b (lt).

Source

fn less_equal(&self, rhs: impl Operand) -> ExprResult

C++ a <= b (le).

Source

fn greater(&self, rhs: impl Operand) -> ExprResult

C++ a > b (gt).

Source

fn greater_equal(&self, rhs: impl Operand) -> ExprResult

C++ a >= b (ge).

Source

fn equal(&self, rhs: impl Operand) -> ExprResult

C++ a == b (eq).

Source

fn not_equal(&self, rhs: impl Operand) -> ExprResult

C++ a != b (ne).

Source

fn logical_and(&self, rhs: impl IntoExpr) -> ExprResult

C++ a && b (logical_and).

Source

fn logical_or(&self, rhs: impl IntoExpr) -> ExprResult

C++ a || b (logical_or).

Source

fn div(&self, rhs: impl Operand) -> ExprResult

C++ div: a / b, truncating for integers.

Source

fn truncdiv(&self, rhs: impl Operand) -> ExprResult

C++ truncdiv.

Source

fn truncmod(&self, rhs: impl Operand) -> ExprResult

C++ truncmod.

Source

fn floordiv(&self, rhs: impl Operand) -> ExprResult

C++ floordiv.

Source

fn floormod(&self, rhs: impl Operand) -> ExprResult

C++ floormod.

Source

fn indexdiv(&self, rhs: impl Operand) -> ExprResult

C++ indexdiv.

Source

fn indexmod(&self, rhs: impl Operand) -> ExprResult

C++ indexmod.

Source

fn ceildiv(&self, rhs: impl Operand) -> ExprResult

C++ ceildiv.

Source

fn min(&self, rhs: impl Operand) -> ExprResult

C++ min.

Source

fn max(&self, rhs: impl Operand) -> ExprResult

C++ max.

Source

fn pow(&self, rhs: impl IntoExpr) -> ExprResult

C++ pow(a, b) (pow).

Source

fn fmod(&self, rhs: impl IntoExpr) -> ExprResult

C++ fmod(a, b) (fmod).

Source

fn atan2(&self, rhs: impl IntoExpr) -> ExprResult

C++ atan2(a, b) (atan2).

Source

fn nextafter(&self, rhs: impl IntoExpr) -> ExprResult

C++ nextafter(a, b) (nextafter).

Source

fn copysign(&self, rhs: impl IntoExpr) -> ExprResult

C++ copysign(a, b) (copysign).

Source

fn hypot(&self, rhs: impl IntoExpr) -> ExprResult

C++ hypot(a, b) (hypot).

Source

fn ldexp(&self, rhs: impl IntoExpr) -> ExprResult

C++ ldexp(a, b) (ldexp).

Source

fn bitwise_not(&self) -> ExprResult

C++ ~a (bitwise_not).

Source

fn floor(&self) -> ExprResult

C++ floor.

Source

fn ceil(&self) -> ExprResult

C++ ceil.

Source

fn round(&self) -> ExprResult

C++ round.

Source

fn nearbyint(&self) -> ExprResult

C++ nearbyint.

Source

fn trunc(&self) -> ExprResult

C++ trunc.

Source

fn abs(&self) -> ExprResult

C++ abs.

Source

fn isnan(&self) -> ExprResult

C++ isnan.

Source

fn isinf(&self) -> ExprResult

C++ isinf.

Source

fn isfinite(&self) -> ExprResult

C++ isfinite.

Source

fn likely(&self) -> ExprResult

C++ likely.

Source

fn assume(&self) -> ExprResult

C++ assume.

Source

fn clz(&self) -> ExprResult

C++ clz.

Source

fn exp(&self) -> ExprResult

C++ exp.

Source

fn exp2(&self) -> ExprResult

C++ exp2.

Source

fn exp10(&self) -> ExprResult

C++ exp10.

Source

fn erf(&self) -> ExprResult

C++ erf.

Source

fn sigmoid(&self) -> ExprResult

C++ sigmoid.

Source

fn sqrt(&self) -> ExprResult

C++ sqrt.

Source

fn rsqrt(&self) -> ExprResult

C++ rsqrt.

Source

fn log(&self) -> ExprResult

C++ log.

Source

fn log2(&self) -> ExprResult

C++ log2.

Source

fn log10(&self) -> ExprResult

C++ log10.

Source

fn log1p(&self) -> ExprResult

C++ log1p.

Source

fn popcount(&self) -> ExprResult

C++ popcount.

Source

fn tanh(&self) -> ExprResult

C++ tanh.

Source

fn tan(&self) -> ExprResult

C++ tan.

Source

fn cos(&self) -> ExprResult

C++ cos.

Source

fn cosh(&self) -> ExprResult

C++ cosh.

Source

fn sin(&self) -> ExprResult

C++ sin.

Source

fn sinh(&self) -> ExprResult

C++ sinh.

Source

fn asin(&self) -> ExprResult

C++ asin.

Source

fn acos(&self) -> ExprResult

C++ acos.

Source

fn atan(&self) -> ExprResult

C++ atan.

Source

fn acosh(&self) -> ExprResult

C++ acosh.

Source

fn asinh(&self) -> ExprResult

C++ asinh.

Source

fn atanh(&self) -> ExprResult

C++ atanh.

Source

fn cast(&self, ty: impl Into<PrimType>) -> ExprResult

C++ cast(a, t) (cast).

Source

fn if_then_else(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult

C++ if_then_else(self, t, f) (if_then_else), with self the condition.

Source

fn select(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult

The raw Select(self, t, f) (Select::new), with self the condition.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§