docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::symbolic::AssumptionsBounds Class Reference

Bundles Assumptions with both the loose and tight BoundAnalysis derived from them. More...

#include <sdfg/symbolic/extreme_values.h>

Public Member Functions

 AssumptionsBounds (const Assumptions &assums)
const Assumptions & assums () const
BoundAnalysis & loose ()
BoundAnalysis & tight ()
bool is_nonneg (const Expression &expr, const SymbolSet &parameters)
 Memoized loose-mode is_nonneg(expr, parameters, assums(), false).
bool is_positive (const Expression &expr, const SymbolSet &parameters)
 Memoized loose-mode is_positive(expr, parameters, assums(), false).
std::unordered_map< Expression, std::shared_ptr< const DelinearizeResult >, SymEngine::RCPBasicHash, SymEngine::RCPBasicKeyEq > & delinearize_memo ()
 Memo for delinearize(expr, *this), which is pure in (expr, assums()).

Detailed Description

Bundles Assumptions with both the loose and tight BoundAnalysis derived from them.

Many symbolic operations (delinearize, is_subset, is_disjoint, dependence_deltas) issue many internal minimum/maximum queries against the same Assumptions while occasionally needing tight vs. loose bounds. Constructing one AssumptionsBounds per scope and threading it through these operations lets the BoundAnalysis memoization cache amortize across all of them — replacing N fresh BoundAnalysis constructions and N independent caches with a single pair per scope.

The wrapper holds a reference to the underlying Assumptions, so callers must keep the Assumptions alive for the lifetime of the AssumptionsBounds.

Constructor & Destructor Documentation

◆ AssumptionsBounds()

sdfg::symbolic::AssumptionsBounds::AssumptionsBounds ( const Assumptions & assums)
inlineexplicit

Member Function Documentation

◆ assums()

const Assumptions & sdfg::symbolic::AssumptionsBounds::assums ( ) const
inline

◆ delinearize_memo()

std::unordered_map< Expression, std::shared_ptr< const DelinearizeResult >, SymEngine::RCPBasicHash, SymEngine::RCPBasicKeyEq > & sdfg::symbolic::AssumptionsBounds::delinearize_memo ( )
inline

Memo for delinearize(expr, *this), which is pure in (expr, assums()).

◆ is_nonneg()

bool sdfg::symbolic::AssumptionsBounds::is_nonneg ( const Expression & expr,
const SymbolSet & parameters )

Memoized loose-mode is_nonneg(expr, parameters, assums(), false).

◆ is_positive()

bool sdfg::symbolic::AssumptionsBounds::is_positive ( const Expression & expr,
const SymbolSet & parameters )

Memoized loose-mode is_positive(expr, parameters, assums(), false).

◆ loose()

BoundAnalysis & sdfg::symbolic::AssumptionsBounds::loose ( )
inline

◆ tight()

BoundAnalysis & sdfg::symbolic::AssumptionsBounds::tight ( )
inline

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