tvm_tirx::ir::prim::op

Trait Operand

Source
pub trait Operand { }
Expand description

An operand of an operator: an expression, an expression under construction (ExprResult) or a literal, which is typed after the expression it meets (C++ TVM_DEFINE_BINOP_CONST_VAL_OVERLOAD and friends): an i32 or i64 is MakeConst(other.ty(), v), an f32 a float32 constant, an f64 a float64 one. A literal that meets no expression is the constant From makes of it.

Implementations on Foreign Types§

Source§

impl Operand for f32

C++ float: a float32 constant, whatever the other side.

Source§

impl Operand for f64

C++ double: a float64 constant, whatever the other side.

Source§

impl Operand for i32

C++ int: MakeConst(other.ty(), v). i32 is what an unsuffixed literal falls back to.

Source§

impl Operand for i64

Implementors§