MLIR
20.0.0git
|
CRTP base classes for Python types that subclass Type and should be castable from it (i.e. More...
#include "Bindings/Python/IRModule.h"
Public Types | |
using | ClassTy = nanobind::class_< DerivedTy, BaseTy > |
using | IsAFunctionTy = bool(*)(MlirType) |
using | GetTypeIDFunctionTy = MlirTypeID(*)() |
Public Member Functions | |
PyConcreteType ()=default | |
PyConcreteType (PyMlirContextRef contextRef, MlirType t) | |
PyConcreteType (PyType &orig) | |
Public Member Functions inherited from mlir::python::PyType | |
PyType (PyMlirContextRef contextRef, MlirType type) | |
bool | operator== (const PyType &other) const |
operator MlirType () const | |
MlirType | get () const |
nanobind::object | getCapsule () |
Gets a capsule wrapping the void* within the MlirType. More... | |
Public Member Functions inherited from mlir::python::BaseContextObject | |
BaseContextObject (PyMlirContextRef ref) | |
PyMlirContextRef & | getContext () |
Accesses the context reference. More... | |
Static Public Member Functions | |
static MlirType | castFrom (PyType &orig) |
static void | bind (nanobind::module_ &m) |
static void | bindDerived (ClassTy &m) |
Implemented by derived classes to add methods to the Python subclass. More... | |
Static Public Member Functions inherited from mlir::python::PyType | |
static PyType | createFromCapsule (nanobind::object capsule) |
Creates a PyType from the MlirType wrapped by a capsule. More... | |
Static Public Attributes | |
static constexpr GetTypeIDFunctionTy | getTypeIdFunction = nullptr |
CRTP base classes for Python types that subclass Type and should be castable from it (i.e.
via something like IntegerType(t)). By default, type class hierarchies are one level deep (i.e. a concrete type class extends PyType); however, intermediate python-visible base classes can be modeled by specifying a BaseTy.
Definition at line 927 of file IRModule.h.
using mlir::python::PyConcreteType< DerivedTy, BaseTy >::ClassTy = nanobind::class_<DerivedTy, BaseTy> |
Definition at line 932 of file IRModule.h.
using mlir::python::PyConcreteType< DerivedTy, BaseTy >::GetTypeIDFunctionTy = MlirTypeID (*)() |
Definition at line 934 of file IRModule.h.
using mlir::python::PyConcreteType< DerivedTy, BaseTy >::IsAFunctionTy = bool (*)(MlirType) |
Definition at line 933 of file IRModule.h.
|
default |
|
inline |
Definition at line 938 of file IRModule.h.
|
inline |
Definition at line 940 of file IRModule.h.
|
inlinestatic |
Definition at line 956 of file IRModule.h.
|
inlinestatic |
Implemented by derived classes to add methods to the Python subclass.
Definition at line 998 of file IRModule.h.
|
inlinestatic |
Definition at line 943 of file IRModule.h.
|
staticconstexpr |
Definition at line 935 of file IRModule.h.