MLIR: lib/CAPI/IR/IntegerSet.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

16

17using namespace mlir;

18

22

26

32

34

36 intptr_t numSymbols) {

38 static_cast<unsigned>(numSymbols),

40}

41

43 intptr_t numSymbols, intptr_t numConstraints,

44 const MlirAffineExpr *constraints,

45 const bool *eqFlags) {

47 (void)unwrapList(static_cast<size_t>(numConstraints), constraints,

48 mlirConstraints);

50 static_cast<unsigned>(numDims), static_cast<unsigned>(numSymbols),

51 mlirConstraints,

52 llvm::ArrayRef(eqFlags, static_cast<size_t>(numConstraints))));

53}

54

55MlirIntegerSet

57 const MlirAffineExpr *dimReplacements,

58 const MlirAffineExpr *symbolReplacements,

59 intptr_t numResultDims, intptr_t numResultSymbols) {

63 mlirSymbols);

64 return wrap(unwrap(set).replaceDimsAndSymbols(

65 mlirDims, mlirSymbols, static_cast<unsigned>(numResultDims),

66 static_cast<unsigned>(numResultSymbols)));

67}

68

70 return unwrap(set).isEmptyIntegerSet();

71}

72

74 return static_cast<intptr_t>(unwrap(set).getNumDims());

75}

76

78 return static_cast<intptr_t>(unwrap(set).getNumSymbols());

79}

80

82 return static_cast<intptr_t>(unwrap(set).getNumInputs());

83}

84

86 return static_cast<intptr_t>(unwrap(set).getNumConstraints());

87}

88

90 return static_cast<intptr_t>(unwrap(set).getNumEqualities());

91}

92

94 return static_cast<intptr_t>(unwrap(set).getNumInequalities());

95}

96

98 return wrap(unwrap(set).getConstraint(static_cast<unsigned>(pos)));

99}

100

102 return unwrap(set).isEq(pos);

103}

MlirIntegerSet mlirIntegerSetReplaceGet(MlirIntegerSet set, const MlirAffineExpr *dimReplacements, const MlirAffineExpr *symbolReplacements, intptr_t numResultDims, intptr_t numResultSymbols)

Definition IntegerSet.cpp:56

void mlirIntegerSetDump(MlirIntegerSet set)

Definition IntegerSet.cpp:33

intptr_t mlirIntegerSetGetNumSymbols(MlirIntegerSet set)

Definition IntegerSet.cpp:77

bool mlirIntegerSetIsCanonicalEmpty(MlirIntegerSet set)

Definition IntegerSet.cpp:69

intptr_t mlirIntegerSetGetNumEqualities(MlirIntegerSet set)

Definition IntegerSet.cpp:89

intptr_t mlirIntegerSetGetNumConstraints(MlirIntegerSet set)

Definition IntegerSet.cpp:85

intptr_t mlirIntegerSetGetNumInequalities(MlirIntegerSet set)

Definition IntegerSet.cpp:93

intptr_t mlirIntegerSetGetNumInputs(MlirIntegerSet set)

Definition IntegerSet.cpp:81

MlirIntegerSet mlirIntegerSetEmptyGet(MlirContext context, intptr_t numDims, intptr_t numSymbols)

Definition IntegerSet.cpp:35

bool mlirIntegerSetEqual(MlirIntegerSet s1, MlirIntegerSet s2)

Checks if two integer set objects are equal.

Definition IntegerSet.cpp:23

void mlirIntegerSetPrint(MlirIntegerSet set, MlirStringCallback callback, void *userData)

Definition IntegerSet.cpp:27

MlirContext mlirIntegerSetGetContext(MlirIntegerSet set)

Gets the context in which the given integer set lives.

Definition IntegerSet.cpp:19

MlirAffineExpr mlirIntegerSetGetConstraint(MlirIntegerSet set, intptr_t pos)

Definition IntegerSet.cpp:97

intptr_t mlirIntegerSetGetNumDims(MlirIntegerSet set)

Definition IntegerSet.cpp:73

MlirIntegerSet mlirIntegerSetGet(MlirContext context, intptr_t numDims, intptr_t numSymbols, intptr_t numConstraints, const MlirAffineExpr *constraints, const bool *eqFlags)

Definition IntegerSet.cpp:42

bool mlirIntegerSetIsConstraintEq(MlirIntegerSet set, intptr_t pos)

Prints an integer set by sending chunks of the string representation and forwarding userData to callb...

Definition IntegerSet.cpp:101

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...

MlirDiagnostic wrap(mlir::Diagnostic &diagnostic)

mlir::Diagnostic & unwrap(MlirDiagnostic diagnostic)

void(* MlirStringCallback)(MlirStringRef, void *)

A callback for returning string references.

Include the generated interface declarations.