36 intptr_t numSymbols) {
38 static_cast<unsigned>(numSymbols),
43 intptr_t numSymbols, intptr_t numConstraints,
44 const MlirAffineExpr *constraints,
45 const bool *eqFlags) {
47 (void)
unwrapList(
static_cast<size_t>(numConstraints), constraints,
50 static_cast<unsigned>(numDims),
static_cast<unsigned>(numSymbols),
57 const MlirAffineExpr *dimReplacements,
58 const MlirAffineExpr *symbolReplacements,
59 intptr_t numResultDims, intptr_t numResultSymbols) {
65 mlirDims, mlirSymbols,
static_cast<unsigned>(numResultDims),
66 static_cast<unsigned>(numResultSymbols)));
70 return unwrap(set).isEmptyIntegerSet();
74 return static_cast<intptr_t
>(
unwrap(set).getNumDims());
78 return static_cast<intptr_t
>(
unwrap(set).getNumSymbols());
82 return static_cast<intptr_t
>(
unwrap(set).getNumInputs());
86 return static_cast<intptr_t
>(
unwrap(set).getNumConstraints());
90 return static_cast<intptr_t
>(
unwrap(set).getNumEqualities());
94 return static_cast<intptr_t
>(
unwrap(set).getNumInequalities());
98 return wrap(
unwrap(set).getConstraint(
static_cast<unsigned>(pos)));
102 return unwrap(set).isEq(pos);
MlirIntegerSet mlirIntegerSetReplaceGet(MlirIntegerSet set, const MlirAffineExpr *dimReplacements, const MlirAffineExpr *symbolReplacements, intptr_t numResultDims, intptr_t numResultSymbols)
Gets or creates a new integer set in which the values and dimensions of the given set are replaced wi...
void mlirIntegerSetDump(MlirIntegerSet set)
Prints an integer set to the standard error stream.
intptr_t mlirIntegerSetGetNumSymbols(MlirIntegerSet set)
Returns the number of symbols in the given set.
bool mlirIntegerSetIsCanonicalEmpty(MlirIntegerSet set)
Checks whether the given set is a canonical empty set, e.g., the set returned by mlirIntegerSetEmptyG...
intptr_t mlirIntegerSetGetNumEqualities(MlirIntegerSet set)
Returns the number of equalities in the given set.
intptr_t mlirIntegerSetGetNumConstraints(MlirIntegerSet set)
Returns the number of constraints (equalities + inequalities) in the given set.
intptr_t mlirIntegerSetGetNumInequalities(MlirIntegerSet set)
Returns the number of inequalities in the given set.
intptr_t mlirIntegerSetGetNumInputs(MlirIntegerSet set)
Returns the number of inputs (dimensions + symbols) in the given set.
MlirIntegerSet mlirIntegerSetEmptyGet(MlirContext context, intptr_t numDims, intptr_t numSymbols)
Gets or creates a new canonically empty integer set with the give number of dimensions and symbols in...
bool mlirIntegerSetEqual(MlirIntegerSet s1, MlirIntegerSet s2)
Checks if two integer set objects are equal.
void mlirIntegerSetPrint(MlirIntegerSet set, MlirStringCallback callback, void *userData)
Prints an integer set by sending chunks of the string representation and forwarding userData tocallba...
MlirContext mlirIntegerSetGetContext(MlirIntegerSet set)
Gets the context in which the given integer set lives.
MlirAffineExpr mlirIntegerSetGetConstraint(MlirIntegerSet set, intptr_t pos)
Returns pos-th constraint of the set.
intptr_t mlirIntegerSetGetNumDims(MlirIntegerSet set)
Returns the number of dimensions in the given set.
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 the given context.
bool mlirIntegerSetIsConstraintEq(MlirIntegerSet set, intptr_t pos)
Returns true of the pos-th constraint of the set is an equality constraint, false otherwise.
static MLIRContext * getContext(OpFoldResult val)
static llvm::ArrayRef< CppTy > unwrapList(size_t size, CTy *first, llvm::SmallVectorImpl< CppTy > &storage)
void print(raw_ostream &os) const
Outputs this diagnostic to a stream.
static IntegerSet get(unsigned dimCount, unsigned symbolCount, ArrayRef< AffineExpr > constraints, ArrayRef< bool > eqFlags)
static IntegerSet getEmptySet(unsigned numDims, unsigned numSymbols, MLIRContext *context)
A simple raw ostream subclass that forwards write_impl calls to the user-supplied callback together w...
mlir::Diagnostic & unwrap(MlirDiagnostic diagnostic)
MlirDiagnostic wrap(mlir::Diagnostic &diagnostic)
void(* MlirStringCallback)(MlirStringRef, void *)
A callback for returning string references.
Include the generated interface declarations.