tilus.Script.assume

Contents

tilus.Script.assume

Script.assume(cond)[source]

Compiler hint to assume a condition is true.

This method is used to provide a condition that the compiler can assume to be true. It is typically used to provide additional information to the compiler for optimization purposes.

The condition can be a boolean expression with the following forms:

  • term

  • term [and term]*

where term can be one of the following forms:

  • a % c == 0, where a is a kernel parameter and c is a constant.

Parameters:

cond (Expr | bool) – The condition to assume. It must be an expression that evaluates to a boolean value or a boolean value.

Raises:

InstructionError – If the condition is not a boolean expression or if it cannot be recognized.

Return type:

None