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 >
 Query results keyed by expression object identity.
 

Public Member Functions

TVM_TIRX_DLL ConstIntBound operator() (const PrimExpr &expr) const
 Compute conservative constant bounds under the current premises.
 
TVM_TIRX_DLL ConstIntBound operator() (const PrimExpr &expr, BoundMapType *bound)
 Compute bounds and optionally collect intermediate query results.
 
TVM_TIRX_DLL bool IsBound (const Var &var) const
 Check whether a binding or recognized predicate supplies bounds for a variable.
 

Friends

class AnalyzerObj
 

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>

Query results keyed by expression object identity.

Member Function Documentation

◆ IsBound()

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

Check whether a binding or recognized predicate supplies bounds for a variable.

Parameters
varThe variable.
Returns
True when such information is recorded, even if its bounds are unbounded.

◆ operator()() [1/2]

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

Compute conservative constant bounds under the current premises.

Parameters
exprThe integer expression to analyze.
Returns
Inclusive bounds; unproved endpoints use the infinity sentinels.

◆ operator()() [2/2]

TVM_TIRX_DLL ConstIntBound tvm::sym::ConstIntBoundAnalyzer::operator() ( const PrimExpr &  expr,
BoundMapType *  bound 
)

Compute bounds and optionally collect intermediate query results.

Parameters
exprThe integer expression to analyze.
boundOptional output map, cleared on entry and borrowed only for this call. Its results describe the current premises and are not updated by later synchronization.
Returns
Inclusive conservative bounds for expr.

Friends And Related Symbol Documentation

◆ AnalyzerObj

friend class AnalyzerObj
friend

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