MLIR
20.0.0git
|
CRTP base classes for Python attributes that subclass Attribute and should be castable from it (i.e. More...
#include "Bindings/Python/IRModule.h"
Public Types | |
using | ClassTy = pybind11::class_< DerivedTy, BaseTy > |
using | IsAFunctionTy = bool(*)(MlirAttribute) |
using | GetTypeIDFunctionTy = MlirTypeID(*)() |
Public Member Functions | |
PyConcreteAttribute ()=default | |
PyConcreteAttribute (PyMlirContextRef contextRef, MlirAttribute attr) | |
PyConcreteAttribute (PyAttribute &orig) | |
Public Member Functions inherited from mlir::python::PyAttribute | |
PyAttribute (PyMlirContextRef contextRef, MlirAttribute attr) | |
bool | operator== (const PyAttribute &other) const |
operator MlirAttribute () const | |
MlirAttribute | get () const |
pybind11::object | getCapsule () |
Gets a capsule wrapping the void* within the MlirAttribute. More... | |
Public Member Functions inherited from mlir::python::BaseContextObject | |
BaseContextObject (PyMlirContextRef ref) | |
PyMlirContextRef & | getContext () |
Accesses the context reference. More... | |
Static Public Member Functions | |
static MlirAttribute | castFrom (PyAttribute &orig) |
static void | bind (pybind11::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::PyAttribute | |
static PyAttribute | createFromCapsule (pybind11::object capsule) |
Creates a PyAttribute from the MlirAttribute wrapped by a capsule. More... | |
Static Public Attributes | |
static constexpr GetTypeIDFunctionTy | getTypeIdFunction = nullptr |
CRTP base classes for Python attributes that subclass Attribute and should be castable from it (i.e.
via something like StringAttr(attr)). By default, attribute class hierarchies are one level deep (i.e. a concrete attribute class extends PyAttribute); however, intermediate python-visible base classes can be modeled by specifying a BaseTy.
Definition at line 1052 of file IRModule.h.
using mlir::python::PyConcreteAttribute< DerivedTy, BaseTy >::ClassTy = pybind11::class_<DerivedTy, BaseTy> |
Definition at line 1057 of file IRModule.h.
using mlir::python::PyConcreteAttribute< DerivedTy, BaseTy >::GetTypeIDFunctionTy = MlirTypeID (*)() |
Definition at line 1059 of file IRModule.h.
using mlir::python::PyConcreteAttribute< DerivedTy, BaseTy >::IsAFunctionTy = bool (*)(MlirAttribute) |
Definition at line 1058 of file IRModule.h.
|
default |
|
inline |
Definition at line 1063 of file IRModule.h.
|
inline |
Definition at line 1065 of file IRModule.h.
|
inlinestatic |
Definition at line 1079 of file IRModule.h.
|
inlinestatic |
Implemented by derived classes to add methods to the Python subclass.
Definition at line 1124 of file IRModule.h.
|
inlinestatic |
Definition at line 1068 of file IRModule.h.
|
staticconstexpr |
Definition at line 1060 of file IRModule.h.