MLIR
20.0.0git
|
Wrapper around the generic MlirType. More...
#include "Bindings/Python/IRModule.h"
Public Member Functions | |
PyType (PyMlirContextRef contextRef, MlirType type) | |
bool | operator== (const PyType &other) const |
operator MlirType () const | |
MlirType | get () const |
pybind11::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 PyType | createFromCapsule (pybind11::object capsule) |
Creates a PyType from the MlirType wrapped by a capsule. More... | |
Wrapper around the generic MlirType.
The lifetime of a type is bound by the PyContext that created it.
Definition at line 880 of file IRModule.h.
|
inline |
Definition at line 882 of file IRModule.h.
Referenced by createFromCapsule().
|
static |
Creates a PyType from the MlirType wrapped by a capsule.
Note that PyType instances are uniqued, so the returned object may be a pre-existing object. Ownership of the underlying MlirType is taken by calling this function.
Definition at line 1965 of file IRCore.cpp.
References mlir::python::PyMlirContext::forContext(), mlirPythonCapsuleToType(), mlirTypeGetContext(), mlirTypeIsNull(), and PyType().
|
inline |
Definition at line 886 of file IRModule.h.
py::object PyType::getCapsule | ( | ) |
Gets a capsule wrapping the void* within the MlirType.
Definition at line 1961 of file IRCore.cpp.
References mlirPythonTypeToCapsule().
|
inline |
Definition at line 885 of file IRModule.h.
bool PyType::operator== | ( | const PyType & | other | ) | const |
Definition at line 1957 of file IRCore.cpp.
References mlirTypeEqual().