Template Function tvm::if_then_else(const Pattern&, const Pattern&, const Pattern&)

Template Function tvm::if_then_else(const Pattern<TCond>&, const Pattern<TA>&, const Pattern<TB>&)#

Function Documentation#

template<typename TCond, typename TA, typename TB>
inline PCallExpr<PIfThenElseOp, TCond, TA, TB> tvm::if_then_else(const Pattern<TCond> &cond, const Pattern<TA> &true_value, const Pattern<TB> &false_value)#

Construct a if_then_else pattern.

Parameters:
  • cond – The condition expression.

  • true_value – The value when condition is true.

  • false_value – The value when condition is false.

Template Parameters:
  • TCond – The pattern type of the condition.

  • TA – The pattern type of the true operand.

  • TB – The pattern type of the false operand.

Returns:

The result pattern.