|
MLIR 22.0.0git
|
Wrapper around an MlirLocation. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Member Functions | |
| PyLocation (PyMlirContextRef contextRef, MlirLocation loc) | |
| operator MlirLocation () const | |
| MlirLocation | get () const |
| void | contextExit (const nanobind::object &excType, const nanobind::object &excVal, const nanobind::object &excTb) |
| nanobind::object | getCapsule () |
| Gets a capsule wrapping the void* within the MlirLocation. | |
| Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject | |
| BaseContextObject (PyMlirContextRef ref) | |
| PyMlirContextRef & | getContext () |
| Accesses the context reference. | |
Static Public Member Functions | |
| static nanobind::object | contextEnter (nanobind::object location) |
| Enter and exit the context manager. | |
| static PyLocation | createFromCapsule (nanobind::object capsule) |
| Creates a PyLocation from the MlirLocation wrapped by a capsule. | |
|
inline |
Definition at line 308 of file IRCore.h.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject::BaseContextObject().
|
static |
Enter and exit the context manager.
Definition at line 852 of file IRCore.cpp.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyMlirContext::forContext().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
| void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation::contextExit | ( | const nanobind::object & | excType, |
| const nanobind::object & | excVal, | ||
| const nanobind::object & | excTb ) |
Definition at line 856 of file IRCore.cpp.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyThreadContextEntry::pushLocation().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
static |
Creates a PyLocation from the MlirLocation wrapped by a capsule.
Note that PyLocation instances are uniqued, so the returned object may be a pre-existing object. Ownership of the underlying MlirLocation is taken by calling this function.
Definition at line 844 of file IRCore.cpp.
References mlirPythonLocationToCapsule().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inline |
Definition at line 312 of file IRCore.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
| nb::object mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyLocation::getCapsule | ( | ) |
Gets a capsule wrapping the void* within the MlirLocation.
Definition at line 840 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inline |