|
MLIR 22.0.0git
|
#include "mlir-c/IntegerSet.h"#include "mlir-c/AffineExpr.h"#include "mlir/CAPI/AffineExpr.h"#include "mlir/CAPI/IR.h"#include "mlir/CAPI/IntegerSet.h"#include "mlir/CAPI/Utils.h"#include "mlir/IR/IntegerSet.h"Go to the source code of this file.
Functions | |
| MlirContext | mlirIntegerSetGetContext (MlirIntegerSet set) |
| Gets the context in which the given integer set lives. | |
| bool | mlirIntegerSetEqual (MlirIntegerSet s1, MlirIntegerSet s2) |
| Checks if two integer set objects are equal. | |
| void | mlirIntegerSetPrint (MlirIntegerSet set, MlirStringCallback callback, void *userData) |
| void | mlirIntegerSetDump (MlirIntegerSet set) |
| MlirIntegerSet | mlirIntegerSetEmptyGet (MlirContext context, intptr_t numDims, intptr_t numSymbols) |
| MlirIntegerSet | mlirIntegerSetGet (MlirContext context, intptr_t numDims, intptr_t numSymbols, intptr_t numConstraints, const MlirAffineExpr *constraints, const bool *eqFlags) |
| MlirIntegerSet | mlirIntegerSetReplaceGet (MlirIntegerSet set, const MlirAffineExpr *dimReplacements, const MlirAffineExpr *symbolReplacements, intptr_t numResultDims, intptr_t numResultSymbols) |
| bool | mlirIntegerSetIsCanonicalEmpty (MlirIntegerSet set) |
| intptr_t | mlirIntegerSetGetNumDims (MlirIntegerSet set) |
| intptr_t | mlirIntegerSetGetNumSymbols (MlirIntegerSet set) |
| intptr_t | mlirIntegerSetGetNumInputs (MlirIntegerSet set) |
| intptr_t | mlirIntegerSetGetNumConstraints (MlirIntegerSet set) |
| intptr_t | mlirIntegerSetGetNumEqualities (MlirIntegerSet set) |
| intptr_t | mlirIntegerSetGetNumInequalities (MlirIntegerSet set) |
| MlirAffineExpr | mlirIntegerSetGetConstraint (MlirIntegerSet set, intptr_t pos) |
| bool | mlirIntegerSetIsConstraintEq (MlirIntegerSet set, intptr_t pos) |
| Prints an integer set by sending chunks of the string representation and forwarding userData to callback`. | |
| void mlirIntegerSetDump | ( | MlirIntegerSet | set | ) |
Definition at line 33 of file IntegerSet.cpp.
References unwrap().
| MlirIntegerSet mlirIntegerSetEmptyGet | ( | MlirContext | context, |
| intptr_t | numDims, | ||
| intptr_t | numSymbols ) |
Definition at line 35 of file IntegerSet.cpp.
References mlir::IntegerSet::getEmptySet(), unwrap(), and wrap().
| bool mlirIntegerSetEqual | ( | MlirIntegerSet | s1, |
| MlirIntegerSet | s2 ) |
Checks if two integer set objects are equal.
This is a "shallow" comparison of two objects. Only the sets with some small number of constraints are uniqued and compare equal here. Set objects that represent the same integer set with different constraints may be considered non-equal by this check. Set difference followed by an (expensive) emptiness check should be used to check equivalence of the underlying integer sets.
Definition at line 23 of file IntegerSet.cpp.
References unwrap().
Referenced by mlir::python::PyIntegerSet::operator==().
| MlirIntegerSet mlirIntegerSetGet | ( | MlirContext | context, |
| intptr_t | numDims, | ||
| intptr_t | numSymbols, | ||
| intptr_t | numConstraints, | ||
| const MlirAffineExpr * | constraints, | ||
| const bool * | eqFlags ) |
Definition at line 42 of file IntegerSet.cpp.
References mlir::IntegerSet::get(), unwrapList(), and wrap().
| MlirAffineExpr mlirIntegerSetGetConstraint | ( | MlirIntegerSet | set, |
| intptr_t | pos ) |
Definition at line 97 of file IntegerSet.cpp.
| MlirContext mlirIntegerSetGetContext | ( | MlirIntegerSet | set | ) |
Gets the context in which the given integer set lives.
Definition at line 19 of file IntegerSet.cpp.
References getContext(), unwrap(), and wrap().
Referenced by mlir::python::PyIntegerSet::createFromCapsule().
| intptr_t mlirIntegerSetGetNumConstraints | ( | MlirIntegerSet | set | ) |
Definition at line 85 of file IntegerSet.cpp.
References unwrap().
| intptr_t mlirIntegerSetGetNumDims | ( | MlirIntegerSet | set | ) |
Definition at line 73 of file IntegerSet.cpp.
References unwrap().
| intptr_t mlirIntegerSetGetNumEqualities | ( | MlirIntegerSet | set | ) |
Definition at line 89 of file IntegerSet.cpp.
References unwrap().
| intptr_t mlirIntegerSetGetNumInequalities | ( | MlirIntegerSet | set | ) |
Definition at line 93 of file IntegerSet.cpp.
References unwrap().
| intptr_t mlirIntegerSetGetNumInputs | ( | MlirIntegerSet | set | ) |
Definition at line 81 of file IntegerSet.cpp.
References unwrap().
| intptr_t mlirIntegerSetGetNumSymbols | ( | MlirIntegerSet | set | ) |
Definition at line 77 of file IntegerSet.cpp.
References unwrap().
| bool mlirIntegerSetIsCanonicalEmpty | ( | MlirIntegerSet | set | ) |
Definition at line 69 of file IntegerSet.cpp.
References unwrap().
| bool mlirIntegerSetIsConstraintEq | ( | MlirIntegerSet | set, |
| intptr_t | pos ) |
Prints an integer set by sending chunks of the string representation and forwarding userData to callback`.
Note that the callback may be called / several times with consecutive chunks of the string. MLIR_CAPI_EXPORTED void mlirIntegerSetPrint(MlirIntegerSet set, MlirStringCallback callback, void *userData);
/ Prints an integer set to the standard error stream. MLIR_CAPI_EXPORTED void mlirIntegerSetDump(MlirIntegerSet set);
/ Gets or creates a new canonically empty integer set with the give number of / dimensions and symbols in the given context. MLIR_CAPI_EXPORTED MlirIntegerSet mlirIntegerSetEmptyGet(MlirContext context, intptr_t numDims, intptr_t numSymbols);
/ Gets or creates a new integer set in the given context. The set is defined / by a list of affine constraints, with the given number of input dimensions / and symbols, which are treated as either equalities (eqFlags is 1) or / inequalities (eqFlags is 0). Both constraints and eqFlags are expected / to point to at least numConstraint consecutive values. MLIR_CAPI_EXPORTED MlirIntegerSet mlirIntegerSetGet(MlirContext context, intptr_t numDims, intptr_t numSymbols, intptr_t numConstraints, const MlirAffineExpr *constraints, const bool *eqFlags);
/ Gets or creates a new integer set in which the values and dimensions of the / given set are replaced with the given affine expressions. dimReplacements / and symbolReplacements are expected to point to at least as many / consecutive expressions as the given set has dimensions and symbols, / respectively. The new set will have numResultDims and numResultSymbols / dimensions and symbols, respectively. MLIR_CAPI_EXPORTED MlirIntegerSet mlirIntegerSetReplaceGet( MlirIntegerSet set, const MlirAffineExpr *dimReplacements, const MlirAffineExpr *symbolReplacements, intptr_t numResultDims, intptr_t numResultSymbols);
/ Checks whether the given set is a canonical empty set, e.g., the set / returned by mlirIntegerSetEmptyGet. MLIR_CAPI_EXPORTED bool mlirIntegerSetIsCanonicalEmpty(MlirIntegerSet set);
/ Returns the number of dimensions in the given set. MLIR_CAPI_EXPORTED intptr_t mlirIntegerSetGetNumDims(MlirIntegerSet set);
/ Returns the number of symbols in the given set. MLIR_CAPI_EXPORTED intptr_t mlirIntegerSetGetNumSymbols(MlirIntegerSet set);
/ Returns the number of inputs (dimensions + symbols) in the given set. MLIR_CAPI_EXPORTED intptr_t mlirIntegerSetGetNumInputs(MlirIntegerSet set);
/ Returns the number of constraints (equalities + inequalities) in the given / set. MLIR_CAPI_EXPORTED intptr_t mlirIntegerSetGetNumConstraints(MlirIntegerSet set);
/ Returns the number of equalities in the given set. MLIR_CAPI_EXPORTED intptr_t mlirIntegerSetGetNumEqualities(MlirIntegerSet set);
/ Returns the number of inequalities in the given set. MLIR_CAPI_EXPORTED intptr_t mlirIntegerSetGetNumInequalities(MlirIntegerSet set);
/ Returns pos-th constraint of the set. MLIR_CAPI_EXPORTED MlirAffineExpr mlirIntegerSetGetConstraint(MlirIntegerSet set, intptr_t pos);
/ Returns true of the pos-th constraint of the set is an equality / constraint, false otherwise.
Definition at line 101 of file IntegerSet.cpp.
References unwrap().
| void mlirIntegerSetPrint | ( | MlirIntegerSet | set, |
| MlirStringCallback | callback, | ||
| void * | userData ) |
Definition at line 27 of file IntegerSet.cpp.
References mlir::Diagnostic::print(), and unwrap().
| MlirIntegerSet mlirIntegerSetReplaceGet | ( | MlirIntegerSet | set, |
| const MlirAffineExpr * | dimReplacements, | ||
| const MlirAffineExpr * | symbolReplacements, | ||
| intptr_t | numResultDims, | ||
| intptr_t | numResultSymbols ) |
Definition at line 56 of file IntegerSet.cpp.
References unwrap(), unwrapList(), and wrap().