|
MLIR 22.0.0git
|
#include "mlir/Analysis/Presburger/QuasiPolynomial.h"
Public Member Functions | |
| QuasiPolynomial (unsigned numVars, ArrayRef< Fraction > coeffs={}, ArrayRef< std::vector< SmallVector< Fraction > > > aff={}) | |
| QuasiPolynomial (unsigned numVars, const Fraction &constant) | |
| Define a quasipolynomial which is a single constant. | |
| unsigned | getNumInputs () const |
| const SmallVector< Fraction > & | getCoefficients () const |
| const std::vector< std::vector< SmallVector< Fraction > > > & | getAffine () const |
| QuasiPolynomial | operator+ (const QuasiPolynomial &x) const |
| QuasiPolynomial | operator- (const QuasiPolynomial &x) const |
| QuasiPolynomial | operator* (const QuasiPolynomial &x) const |
| QuasiPolynomial | operator/ (const Fraction &x) const |
| QuasiPolynomial | simplify () |
| QuasiPolynomial | collectTerms () |
| Fraction | getConstantTerm () |
| Public Member Functions inherited from mlir::presburger::PresburgerSpace | |
| PresburgerSpace | getDomainSpace () const |
| Get the domain/range space of this space. | |
| PresburgerSpace | getRangeSpace () const |
| PresburgerSpace | getSpaceWithoutLocals () const |
| Get the space without local variables. | |
| unsigned | getNumDomainVars () const |
| unsigned | getNumRangeVars () const |
| unsigned | getNumSetDimVars () const |
| unsigned | getNumSymbolVars () const |
| unsigned | getNumLocalVars () const |
| unsigned | getNumDimVars () const |
| unsigned | getNumDimAndSymbolVars () const |
| unsigned | getNumVars () const |
| unsigned | getNumVarKind (VarKind kind) const |
| Get the number of vars of the specified kind. | |
| unsigned | getVarKindOffset (VarKind kind) const |
| Return the index at which the specified kind of var starts. | |
| unsigned | getVarKindEnd (VarKind kind) const |
| Return the index at Which the specified kind of var ends. | |
| unsigned | getVarKindOverlap (VarKind kind, unsigned varStart, unsigned varLimit) const |
| Get the number of elements of the specified kind in the range [varStart, varLimit). | |
| VarKind | getVarKindAt (unsigned pos) const |
| Return the VarKind of the var at the specified position. | |
| unsigned | insertVar (VarKind kind, unsigned pos, unsigned num=1) |
| Insert num variables of the specified kind at position pos. | |
| void | removeVarRange (VarKind kind, unsigned varStart, unsigned varLimit) |
| Removes variables of the specified kind in the column range [varStart, varLimit). | |
| void | convertVarKind (VarKind srcKind, unsigned srcPos, unsigned num, VarKind dstKind, unsigned dstPos) |
| Converts variables of the specified kind in the column range [srcPos, srcPos + num) to variables of the specified kind at position dstPos. | |
| void | setVarSymbolSeparation (unsigned newSymbolCount) |
| Changes the partition between dimensions and symbols. | |
| void | swapVar (VarKind kindA, VarKind kindB, unsigned posA, unsigned posB) |
| Swaps the posA^th variable of kindA and posB^th variable of kindB. | |
| bool | isCompatible (const PresburgerSpace &other) const |
| Returns true if both the spaces are compatible i.e. | |
| bool | isEqual (const PresburgerSpace &other) const |
| Returns true if both the spaces are equal including local variables i.e. | |
| Identifier | getId (VarKind kind, unsigned pos) const |
| Get the identifier of pos^th variable of the specified kind. | |
| ArrayRef< Identifier > | getIds (VarKind kind) const |
| ArrayRef< Identifier > | getIds () const |
| void | setId (VarKind kind, unsigned pos, Identifier id) |
| Set the identifier of pos^th variable of the specified kind. | |
| bool | isUsingIds () const |
| Returns if identifiers are being used. | |
| void | resetIds () |
| Reset the stored identifiers in the space. | |
| void | disableIds () |
| Disable identifiers being stored in space. | |
| bool | isAligned (const PresburgerSpace &other) const |
| Check if the spaces are compatible, and the non-local variables having same identifiers are in the same positions. | |
| bool | isAligned (const PresburgerSpace &other, VarKind kind) const |
| Same as above but only check the specified VarKind. | |
| void | mergeAndAlignSymbols (PresburgerSpace &other) |
| Merge and align symbol variables of this and other with respect to identifiers. | |
| void | print (llvm::raw_ostream &os) const |
| void | dump () const |
Additional Inherited Members | |
| Static Public Member Functions inherited from mlir::presburger::PresburgerSpace | |
| static PresburgerSpace | getRelationSpace (unsigned numDomain=0, unsigned numRange=0, unsigned numSymbols=0, unsigned numLocals=0) |
| static PresburgerSpace | getSetSpace (unsigned numDims=0, unsigned numSymbols=0, unsigned numLocals=0) |
| Protected Member Functions inherited from mlir::presburger::PresburgerSpace | |
| PresburgerSpace (unsigned numDomain, unsigned numRange, unsigned numSymbols, unsigned numLocals) | |
Definition at line 37 of file QuasiPolynomial.h.
| QuasiPolynomial::QuasiPolynomial | ( | unsigned | numVars, |
| ArrayRef< Fraction > | coeffs = {}, | ||
| ArrayRef< std::vector< SmallVector< Fraction > > > | aff = {} ) |
Definition at line 16 of file QuasiPolynomial.cpp.
References getNumInputs(), and mlir::presburger::PresburgerSpace::PresburgerSpace().
Referenced by collectTerms(), operator*(), operator+(), operator-(), operator/(), and simplify().
Define a quasipolynomial which is a single constant.
Definition at line 39 of file QuasiPolynomial.cpp.
References mlir::presburger::PresburgerSpace::PresburgerSpace().
| QuasiPolynomial QuasiPolynomial::collectTerms | ( | ) |
Definition at line 146 of file QuasiPolynomial.cpp.
References getNumInputs(), and QuasiPolynomial().
|
inline |
Definition at line 52 of file QuasiPolynomial.h.
|
inline |
Definition at line 50 of file QuasiPolynomial.h.
| Fraction QuasiPolynomial::getConstantTerm | ( | ) |
Definition at line 167 of file QuasiPolynomial.cpp.
|
inline |
Definition at line 46 of file QuasiPolynomial.h.
References mlir::presburger::PresburgerSpace::getNumDomainVars(), and mlir::presburger::PresburgerSpace::getNumSymbolVars().
Referenced by collectTerms(), getBinomialCoefficients(), normalizeDenominatorExponents(), operator*(), operator+(), operator-(), QuasiPolynomial(), and simplify().
| QuasiPolynomial QuasiPolynomial::operator* | ( | const QuasiPolynomial & | x | ) | const |
Definition at line 65 of file QuasiPolynomial.cpp.
References getNumInputs(), product(), and QuasiPolynomial().
| QuasiPolynomial QuasiPolynomial::operator+ | ( | const QuasiPolynomial & | x | ) | const |
Definition at line 44 of file QuasiPolynomial.cpp.
References getNumInputs(), and QuasiPolynomial().
| QuasiPolynomial QuasiPolynomial::operator- | ( | const QuasiPolynomial & | x | ) | const |
Definition at line 55 of file QuasiPolynomial.cpp.
References getNumInputs(), and QuasiPolynomial().
| QuasiPolynomial QuasiPolynomial::operator/ | ( | const Fraction & | x | ) | const |
Definition at line 91 of file QuasiPolynomial.cpp.
References QuasiPolynomial().
| QuasiPolynomial QuasiPolynomial::simplify | ( | ) |
Definition at line 102 of file QuasiPolynomial.cpp.
References getNumInputs(), and QuasiPolynomial().
Referenced by mlir::presburger::detail::computeNumTerms().