|
MLIR 23.0.0git
|
CRTP base classes for Python types that subclass Type and should be castable from it (i.e. More...
#include "mlir/Bindings/Python/IRCore.h"
Inherits mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyType.
Public Types | |
| using | ClassTy = nanobind::class_<DerivedTy, BaseTy> |
| using | IsAFunctionTy = bool (*)(MlirType) |
| using | GetTypeIDFunctionTy = MlirTypeID (*)() |
| using | Base = PyConcreteType |
Public Member Functions | |
| PyConcreteType ()=default | |
| PyConcreteType (PyMlirContextRef contextRef, MlirType t) | |
| PyConcreteType (PyType &orig) | |
| Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::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. | |
| nanobind::typed< nanobind::object, PyType > | maybeDownCast () |
| Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject | |
| BaseContextObject (PyMlirContextRef ref) | |
| PyMlirContextRef & | getContext () |
| Accesses the context reference. | |
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. | |
| Static Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyType | |
| static PyType | createFromCapsule (nanobind::object capsule) |
| Creates a PyType from the MlirType wrapped by a capsule. | |
Static Public Attributes | |
| static constexpr GetTypeIDFunctionTy | getTypeIdFunction = nullptr |
| static const MlirStringRef | name {} |
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.
| using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteType< DerivedTy, BaseTy >::Base = PyConcreteType |
| using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteType< DerivedTy, BaseTy >::ClassTy = nanobind::class_<DerivedTy, BaseTy> |
| using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteType< DerivedTy, BaseTy >::GetTypeIDFunctionTy = MlirTypeID (*)() |
| using mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteType< DerivedTy, BaseTy >::IsAFunctionTy = bool (*)(MlirType) |
|
default |
Referenced by PyConcreteType().
|
inline |
|
inline |
Definition at line 954 of file IRCore.h.
References castFrom(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject::getContext(), PyConcreteType(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyType::PyType().
|
inlinestatic |
Definition at line 969 of file IRCore.h.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyGlobals::get(), mlir::PyPrintAccumulator::getCallback(), mlir::PyPrintAccumulator::getUserData(), mlir::PyPrintAccumulator::join(), mlirTypePrint(), mlir::PyPrintAccumulator::parts, and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyType::PyType().
|
inlinestatic |
|
inlinestatic |
Definition at line 957 of file IRCore.h.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyType::PyType().
Referenced by PyConcreteType().
|
staticconstexpr |
|
inlinestatic |