MLIR
20.0.0git
|
Creates a custom subclass of mlir.ir.Attribute, implementing a casting constructor and type checking methods. More...
#include "mlir/Bindings/Python/NanobindAdaptors.h"
Public Types | |
using | IsAFunctionTy = bool(*)(MlirAttribute) |
using | GetTypeIDFunctionTy = MlirTypeID(*)() |
Public Member Functions | |
mlir_attribute_subclass (nanobind::handle scope, const char *attrClassName, IsAFunctionTy isaFunction, GetTypeIDFunctionTy getTypeIDFunction=nullptr) | |
Subclasses by looking up the super-class dynamically. More... | |
mlir_attribute_subclass (nanobind::handle scope, const char *typeClassName, IsAFunctionTy isaFunction, const nanobind::object &superCls, GetTypeIDFunctionTy getTypeIDFunction=nullptr) | |
Subclasses with a provided mlir.ir.Attribute super-class. More... | |
Public Member Functions inherited from mlir::python::nanobind_adaptors::pure_subclass | |
pure_subclass (nanobind::handle scope, const char *derivedClassName, const nanobind::object &superClass) | |
template<typename Func , typename... Extra> | |
pure_subclass & | def (const char *name, Func &&f, const Extra &...extra) |
template<typename Func , typename... Extra> | |
pure_subclass & | def_property_readonly (const char *name, Func &&f, const Extra &...extra) |
template<typename Func , typename... Extra> | |
pure_subclass & | def_staticmethod (const char *name, Func &&f, const Extra &...extra) |
template<typename Func , typename... Extra> | |
pure_subclass & | def_classmethod (const char *name, Func &&f, const Extra &...extra) |
nanobind::object | get_class () const |
Additional Inherited Members | |
Protected Attributes inherited from mlir::python::nanobind_adaptors::pure_subclass | |
nanobind::object | superClass |
nanobind::object | thisClass |
Creates a custom subclass of mlir.ir.Attribute, implementing a casting constructor and type checking methods.
Definition at line 413 of file NanobindAdaptors.h.
using mlir::python::nanobind_adaptors::mlir_attribute_subclass::GetTypeIDFunctionTy = MlirTypeID (*)() |
Definition at line 416 of file NanobindAdaptors.h.
using mlir::python::nanobind_adaptors::mlir_attribute_subclass::IsAFunctionTy = bool (*)(MlirAttribute) |
Definition at line 415 of file NanobindAdaptors.h.
|
inline |
Subclasses by looking up the super-class dynamically.
Definition at line 419 of file NanobindAdaptors.h.
|
inline |
Subclasses with a provided mlir.ir.Attribute super-class.
This must be used if the subclass is being defined in the same extension module as the mlir.ir class (otherwise, it will trigger a recursive initialization).
Definition at line 432 of file NanobindAdaptors.h.
References mlir::python::nanobind_adaptors::pure_subclass::def(), mlir::python::nanobind_adaptors::pure_subclass::def_staticmethod(), MAKE_MLIR_PYTHON_QUALNAME, MLIR_PYTHON_CAPI_TYPE_CASTER_REGISTER_ATTR, and mlir::python::nanobind_adaptors::pure_subclass::thisClass.