MLIR
22.0.0git
|
Template for a reference to a concrete type which captures a python reference to its underlying python object. More...
#include "Bindings/Python/IRModule.h"
Public Types | |
using | NBTypedT = nanobind::typed< nanobind::object, T > |
Public Member Functions | |
PyObjectRef (T *referrent, nanobind::object object) | |
PyObjectRef (PyObjectRef &&other) noexcept | |
PyObjectRef (const PyObjectRef &other) | |
~PyObjectRef ()=default | |
int | getRefCount () |
nanobind::object | releaseObject () |
Releases the object held by this instance, returning it. More... | |
T * | get () |
T * | operator-> () |
nanobind::object | getObject () |
operator bool () const | |
Template for a reference to a concrete type which captures a python reference to its underlying python object.
Definition at line 53 of file IRModule.h.
using mlir::python::PyObjectRef< T >::NBTypedT = nanobind::typed<nanobind::object, T> |
Definition at line 97 of file IRModule.h.
|
inline |
Definition at line 55 of file IRModule.h.
|
inlinenoexcept |
Definition at line 61 of file IRModule.h.
|
inline |
Definition at line 66 of file IRModule.h.
|
default |
|
inline |
Definition at line 86 of file IRModule.h.
Referenced by maybeInsertOperation().
|
inline |
Definition at line 91 of file IRModule.h.
Referenced by mlir::python::PyThreadContextEntry::pushInsertionPoint(), and mlir::python::PyThreadContextEntry::pushLocation().
|
inline |
Definition at line 70 of file IRModule.h.
|
inline |
Definition at line 95 of file IRModule.h.
|
inline |
Definition at line 87 of file IRModule.h.
|
inline |
Releases the object held by this instance, returning it.
This is the proper thing to return from a function that wants to return the reference. Note that this does not work from initializers.
Definition at line 79 of file IRModule.h.
Referenced by mlir::python::PyMlirContext::createFromCapsule(), mlir::python::PyModule::createFromCapsule(), mlir::python::PyOperation::createFromCapsule(), and mlir::python::PyConcreteOpInterface< ConcreteIface >::getOperationObject().