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

Analyzer to get constant integer bound over expression. More...

#include <analyzer.h>

Collaboration diagram for tvm::arith::ConstIntBoundAnalyzer:

Public Types

using BoundMapType = std::unordered_map< PrimExpr, ConstIntBound, ObjectPtrHash, ObjectPtrEqual >
 

Public Member Functions

ConstIntBound operator() (const PrimExpr &expr) const
 analyze the expr More...
 
ConstIntBound operator() (const PrimExpr &expr, BoundMapType *bound)
 analyze the expr with the intermediate memorized to avoid redundant computation More...
 
void Update (const Var &var, const ConstIntBound &info, bool allow_override=false)
 Update constant int bound information of var. More...
 
void Bind (const Var &var, const Range &range, bool allow_override=false)
 Bind variable to a range. More...
 

Friends

class Analyzer
 
class ConstraintContext
 

Detailed Description

Analyzer to get constant integer bound over expression.

Member Typedef Documentation

◆ BoundMapType

Member Function Documentation

◆ Bind()

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

Bind variable to a range.

Parameters
varThe variable.
rangeThe range we bind to.
allow_overrideWhether we allow overriding an existing var's range.

◆ operator()() [1/2]

ConstIntBound tvm::arith::ConstIntBoundAnalyzer::operator() ( const PrimExpr expr) const

analyze the expr

Parameters
exprThe expression of interest.
Returns
the result of the analysis.

◆ operator()() [2/2]

ConstIntBound tvm::arith::ConstIntBoundAnalyzer::operator() ( const PrimExpr expr,
BoundMapType bound 
)

analyze the expr with the intermediate memorized to avoid redundant computation

Parameters
exprThe expression of interest.
boundThe lookup table to store the intermediate results
Returns
the result of the analysis.

◆ Update()

void tvm::arith::ConstIntBoundAnalyzer::Update ( const Var var,
const ConstIntBound info,
bool  allow_override = false 
)

Update constant int bound information of var.

Parameters
varThe variable of interest.
infoThe bound information.
allow_overridewhether we allow override of existing information.

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: