tvm
Public Member Functions | Friends | List of all members
tvm::arith::TransitiveComparisonAnalyzer Class Reference

Using previously specified knowns, compare the expressions provided. More...

#include <analyzer.h>

Collaboration diagram for tvm::arith::TransitiveComparisonAnalyzer:

Public Member Functions

CompareResult TryCompare (const PrimExpr &lhs, const PrimExpr &rhs, bool propagate_inequalities=true)
 
void Bind (const Var &var, const PrimExpr &expr, bool allow_override=false)
 Bind a variable as being equal to a known expression. More...
 
void Bind (const Var &var, const Range &range, bool allow_override=false)
 Bind a variable as being within a specified range. More...
 
std::function< void()> EnterConstraint (const PrimExpr &constraint)
 Update the internal state to enter constraint. More...
 

Friends

class Analyzer
 
class ConstraintContext
 

Detailed Description

Using previously specified knowns, compare the expressions provided.

Given known expressions [(a OP b), (b OP c), ..., (y OP z)], search for a known result for (a OP z).

Member Function Documentation

◆ Bind() [1/2]

void tvm::arith::TransitiveComparisonAnalyzer::Bind ( const Var var,
const PrimExpr expr,
bool  allow_override = false 
)

Bind a variable as being equal to a known expression.

Parameters
varThe variable of interest.
exprThe bound expression
allow_overrideWhether to allow override of existing information.

◆ Bind() [2/2]

void tvm::arith::TransitiveComparisonAnalyzer::Bind ( const Var var,
const Range range,
bool  allow_override = false 
)

Bind a variable as being within a specified range.

Parameters
varThe variable of interest.
rangeThe known range
allow_overrideWhether to allow override of existing information.

◆ EnterConstraint()

std::function<void()> tvm::arith::TransitiveComparisonAnalyzer::EnterConstraint ( const PrimExpr constraint)

Update the internal state to enter constraint.

Parameters
constraintA constraint expression.
Returns
an exit function that must be called to cleanup the constraint can be nullptr.

◆ TryCompare()

CompareResult tvm::arith::TransitiveComparisonAnalyzer::TryCompare ( const PrimExpr lhs,
const PrimExpr rhs,
bool  propagate_inequalities = true 
)

Friends And Related Function Documentation

◆ Analyzer

friend class Analyzer
friend

◆ ConstraintContext

friend class ConstraintContext
friend

The documentation for this class was generated from the following file: