MLIR
20.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 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 50 of file IRModule.h.
|
inline |
Definition at line 52 of file IRModule.h.
|
inlinenoexcept |
Definition at line 58 of file IRModule.h.
|
inline |
Definition at line 63 of file IRModule.h.
|
default |
|
inline |
Definition at line 83 of file IRModule.h.
Referenced by maybeInsertOperation().
|
inline |
Definition at line 88 of file IRModule.h.
Referenced by mlir::python::PyThreadContextEntry::pushInsertionPoint(), and mlir::python::PyThreadContextEntry::pushLocation().
|
inline |
Definition at line 67 of file IRModule.h.
|
inline |
Definition at line 92 of file IRModule.h.
|
inline |
Definition at line 84 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 76 of file IRModule.h.
Referenced by mlir::python::PyMlirContext::createFromCapsule(), mlir::python::PyModule::createFromCapsule(), mlir::python::PyOperation::createFromCapsule(), and mlir::python::PyConcreteOpInterface< ConcreteIface >::getOperationObject().