[Mlir-commits] [mlir] [mlir][vector] Add convenience types for scalable vectors (PR #87986)

Jakub Kuderski llvmlistbot at llvm.org
Mon Apr 8 12:45:50 PDT 2024


================
@@ -0,0 +1,35 @@
+//===- VectorTypes.h - MLIR Vector Types ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MLIR_DIALECT_VECTOR_IR_VECTORTYPES_H_
+#define MLIR_DIALECT_VECTOR_IR_VECTORTYPES_H_
+
+#include "mlir/IR/BuiltinTypes.h"
+#include "mlir/IR/Diagnostics.h"
+#include "mlir/IR/Types.h"
+
+namespace mlir {
+namespace vector {
+
+class ScalableVectorType : public VectorType {
+public:
+  using VectorType::VectorType;
+
+  static bool classof(Type type);
----------------
kuhar wrote:

Should we define this inline? I guess this could end up getting called frequently and the implementation is very short.

https://github.com/llvm/llvm-project/pull/87986


More information about the Mlir-commits mailing list