1 //===- LinalgTypes.h - Linalg Types ---------------------------------------===// 2 // 3 // Part of the LLVM 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_LINALG_LINALGTYPES_H_ 10 #define MLIR_DIALECT_LINALG_LINALGTYPES_H_ 11 12 #include "mlir/IR/Dialect.h" 13 #include "mlir/IR/Types.h" 14 15 #include "mlir/Dialect/Linalg/IR/LinalgOpsDialect.h.inc" 16 17 namespace mlir { 18 class MLIRContext; 19 20 namespace linalg { 21 22 /// A RangeType represents a minimal range abstraction (min, max, step). 23 /// It is constructed by calling the linalg.range op with three values index of 24 /// index type: 25 /// 26 /// ```mlir 27 /// func @foo(%arg0 : index, %arg1 : index, %arg2 : index) { 28 /// %0 = linalg.range %arg0:%arg1:%arg2 : !linalg.range 29 /// } 30 /// ``` 31 class RangeType : public Type::TypeBase<RangeType, Type, TypeStorage> { 32 public: 33 // Used for generic hooks in TypeBase. 34 using Base::Base; 35 }; 36 37 } // namespace linalg 38 } // namespace mlir 39 40 #endif // MLIR_DIALECT_LINALG_LINALGTYPES_H_ 41