MLIR  20.0.0git
IRTypes.h
Go to the documentation of this file.
1 //===- IRTypes.h - Type Interfaces ----------------------------------------===//
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_BINDINGS_PYTHON_IRTYPES_H
10 #define MLIR_BINDINGS_PYTHON_IRTYPES_H
11 
13 
14 namespace mlir {
15 
16 /// Shaped Type Interface - ShapedType
17 class PyShapedType : public python::PyConcreteType<PyShapedType> {
18 public:
19  static const IsAFunctionTy isaFunction;
20  static constexpr const char *pyClassName = "ShapedType";
21  using PyConcreteType::PyConcreteType;
22 
23  static void bindDerived(ClassTy &c);
24 
25 private:
26  void requireHasRank();
27 };
28 
29 } // namespace mlir
30 
31 #endif // MLIR_BINDINGS_PYTHON_IRTYPES_H
Shaped Type Interface - ShapedType.
Definition: IRTypes.h:17
static constexpr const char * pyClassName
Definition: IRTypes.h:20
static const IsAFunctionTy isaFunction
Definition: IRTypes.h:19
static void bindDerived(ClassTy &c)
Definition: IRTypes.cpp:510
CRTP base classes for Python types that subclass Type and should be castable from it (i....
Definition: IRModule.h:930
pybind11::class_< PyShapedType, PyType > ClassTy
Definition: IRModule.h:935
Include the generated interface declarations.