hidet.ir.expr

Classes:

IfThenElse(cond, then_expr, else_expr)

The if-then-else expression.

Functions:

if_then_else(cond, then_expr, else_expr)

Create an if-then-else expression.

class hidet.ir.expr.IfThenElse(cond, then_expr, else_expr)[source]

The if-then-else expression.

Parameters
  • cond (Expr) – The condition of the if-then-else expression.

  • then_expr (Expr) – The expression to be evaluated if the condition is true.

  • else_expr (Expr) – The expression to be evaluated if the condition is false.

hidet.ir.expr.if_then_else(cond, then_expr, else_expr)[source]

Create an if-then-else expression.

Parameters
  • cond (Expr or PyScalar) – The condition of the if-then-else expression.

  • then_expr (Expr or PyScalar) – The expression to be evaluated if the condition is true.

  • else_expr (Expr or PyScalar) – The expression to be evaluated if the condition is false.

Returns

ret – The if-then-else expression.

Return type

IfThenElse