14 #ifndef MLIR_IR_AFFINE_MAP_H 15 #define MLIR_IR_AFFINE_MAP_H 18 #include "llvm/ADT/ArrayRef.h" 19 #include "llvm/ADT/DenseMapInfo.h" 24 struct AffineMapStorage;
49 static AffineMap get(
unsigned dimCount,
unsigned symbolCount,
56 static AffineMap getMultiDimIdentityMap(
unsigned numDims,
70 explicit operator bool() {
return map !=
nullptr; }
77 bool isIdentity()
const;
83 bool isSingleConstant()
const;
87 int64_t getSingleConstantResult()
const;
90 void print(raw_ostream &os)
const;
93 unsigned getNumDims()
const;
94 unsigned getNumSymbols()
const;
95 unsigned getNumResults()
const;
96 unsigned getNumInputs()
const;
103 void walkExprs(std::function<
void(
AffineExpr)> callback)
const;
112 unsigned numResultDims,
113 unsigned numResultSyms);
138 bool isProjectedPermutation();
141 bool isPermutation();
151 static AffineMap getImpl(
unsigned dimCount,
unsigned symbolCount,
235 return mlir::AffineMap(static_cast<mlir::AffineMap::ImplType *>(pointer));
239 return mlir::AffineMap(static_cast<mlir::AffineMap::ImplType *>(pointer));
251 #endif // MLIR_IR_AFFINE_MAP_H Definition: InferTypeOpInterface.cpp:20
AffineMap inversePermutation(AffineMap map)
Definition: AffineMap.cpp:289
static bool isEqual(mlir::AffineMap LHS, mlir::AffineMap RHS)
Definition: AffineMap.h:244
Definition: PassRegistry.cpp:413
Definition: Attributes.h:129
AffineMap()
Definition: AffineMap.h:41
bool operator!=(AffineMap other) const
Definition: AffineMap.h:72
static mlir::AffineMap getEmptyKey()
Definition: AffineMap.h:233
Definition: LogicalResult.h:18
bool operator==(AffineMap other) const
Definition: AffineMap.h:71
auto map(Fn fun, IterType begin, IterType end) -> SmallVector< typename std::result_of< Fn(decltype(*begin))>::type, 8 >
Map with iterators.
Definition: Functional.h:28
AffineMap(const AffineMap &other)
Definition: AffineMap.h:43
AffineMap concatAffineMaps(ArrayRef< AffineMap > maps)
Definition: AffineMap.cpp:313
inline ::llvm::hash_code hash_value(AffineMap arg)
Definition: AffineMap.h:156
Definition: AffineExpr.h:66
static mlir::AffineMap getTombstoneKey()
Definition: AffineMap.h:237
Definition: AffineMap.h:37
static unsigned getHashValue(mlir::AffineMap val)
Definition: AffineMap.h:241
inline ::llvm::hash_code hash_value(AffineExpr arg)
Make AffineExpr hashable.
Definition: AffineExpr.h:201
void print(raw_ostream &os) const
Definition: AsmPrinter.cpp:2097
AffineMap simplifyAffineMap(AffineMap map)
Simplify an affine map by simplifying its underlying AffineExpr results.
Definition: AffineMap.cpp:280
Definition: MLIRContext.h:34
void print(OpAsmPrinter &p, AffineIfOp op)
Definition: AffineOps.cpp:1671
Definition: AffineMapDetail.h:23
raw_ostream & operator<<(raw_ostream &os, SubViewOp::Range &range)
Definition: Ops.cpp:2759
AffineMap(ImplType *map)
Definition: AffineMap.h:42