My Project
Utils.h
Go to the documentation of this file.
1 //===- Utils.h - VectorOps Utils ----------------------------*- C++ -*-=======//
2 //
3 // Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef MLIR_DIALECT_VECTOROPS_UTILS_H_
10 #define MLIR_DIALECT_VECTOROPS_UTILS_H_
11 
12 #include "mlir/Support/LLVM.h"
13 
14 #include "llvm/ADT/DenseMap.h"
15 
16 namespace mlir {
17 
18 class AffineApplyOp;
19 class AffineForOp;
20 class AffineMap;
21 class Location;
22 class MemRefType;
23 class OpBuilder;
24 class Operation;
25 class Value;
26 class VectorType;
27 
40 Optional<SmallVector<int64_t, 4>> shapeRatio(ArrayRef<int64_t> superShape,
41  ArrayRef<int64_t> subShape);
42 
47 Optional<SmallVector<int64_t, 4>> shapeRatio(VectorType superVectorType,
48  VectorType subVectorType);
49 
115 AffineMap
116 makePermutationMap(Operation *op, ArrayRef<Value> indices,
117  const DenseMap<Operation *, unsigned> &loopToVectorDim);
118 
119 namespace matcher {
120 
129 bool operatesOnSuperVectorsOf(Operation &op, VectorType subVectorType);
130 
131 } // end namespace matcher
132 } // end namespace mlir
133 
134 #endif // MLIR_DIALECT_VECTOROPS_UTILS_H_
Definition: InferTypeOpInterface.cpp:20
Optional< SmallVector< int64_t, 4 > > shapeRatio(ArrayRef< int64_t > superShape, ArrayRef< int64_t > subShape)
Definition: VectorAnalysis.cpp:33
Definition: Attributes.h:129