tvm
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
tvm::sym::ConstIntBoundAnalyzer Class Reference

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

#include <analyzer.h>

Collaboration diagram for tvm::sym::ConstIntBoundAnalyzer:

Public Types

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

Public Member Functions

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

Friends

class AnalyzerObj
 
class ConstraintContext
 

Detailed Description

Analyzer to get constant integer bound over expression.

Member Typedef Documentation

◆ BoundMapType

using tvm::sym::ConstIntBoundAnalyzer::BoundMapType = std::unordered_map<PrimExpr, ConstIntBound, ffi::ObjectPtrHash, ffi::ObjectPtrEqual>

Member Function Documentation

◆ Bind()

TVM_TIRX_DLL void tvm::sym::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.

◆ IsBound()

TVM_TIRX_DLL bool tvm::sym::ConstIntBoundAnalyzer::IsBound ( const Var &  var) const

Check if a variable is bound to a range.

Parameters
varThe variable.
Returns
Whether the variable is bound to a range.

◆ operator()() [1/2]

TVM_TIRX_DLL ConstIntBound tvm::sym::ConstIntBoundAnalyzer::operator() ( const PrimExpr &  expr) const

analyze the expr

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

◆ operator()() [2/2]

TVM_TIRX_DLL ConstIntBound tvm::sym::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()

TVM_TIRX_DLL void tvm::sym::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 Symbol Documentation

◆ AnalyzerObj

friend class AnalyzerObj
friend

◆ ConstraintContext

friend class ConstraintContext
friend

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