tvm_tirx::ir::prim::op

Function if_then_else

Source
pub fn if_then_else(
    cond: impl IntoExpr,
    true_value: impl IntoExpr,
    false_value: impl IntoExpr,
) -> Result<Expr>
Expand description

true_value where cond holds and false_value elsewhere, evaluating only the chosen one; a constant condition folds (C++ if_then_else, prim._OpIfThenElse).