|
MLIR 22.0.0git
|
Wrapper around the generic MlirValue. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Member Functions | |
| virtual | ~PyValue ()=default |
| PyValue (PyOperationRef parentOperation, MlirValue value) | |
| operator MlirValue () const | |
| MlirValue | get () |
| PyOperationRef & | getParentOperation () |
| void | checkValid () |
| nanobind::object | getCapsule () |
| Gets a capsule wrapping the void* within the MlirValue. | |
| nanobind::typed< nanobind::object, PyValue > | maybeDownCast () |
Static Public Member Functions | |
| static PyValue | createFromCapsule (nanobind::object capsule) |
| Creates a PyValue from the MlirValue wrapped by a capsule. | |
Wrapper around the generic MlirValue.
Values are managed completely by the operation that resulted in their definition. For op result value, this is the operation that defines the value. For block argument values, this is the operation that contains the block to which the value is an argument (blocks cannot be detached in Python bindings so such operation always exists).
|
virtualdefault |
|
inline |
Definition at line 1179 of file IRCore.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteValue< DerivedTy >::bind(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteValue< DerivedTy >::castFrom(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteValue< DerivedTy >::PyConcreteValue(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteValue< DerivedTy >::PyConcreteValue().
|
inline |
|
static |
Creates a PyValue from the MlirValue wrapped by a capsule.
Ownership of the underlying MlirValue is still tied to the owning operation.
Definition at line 2016 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inline |
| nb::object mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue::getCapsule | ( | ) |
Gets a capsule wrapping the void* within the MlirValue.
Definition at line 1997 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inline |
Definition at line 1184 of file IRCore.h.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteValue< DerivedTy >::PyConcreteValue().
| nb::typed< nb::object, PyValue > mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue::maybeDownCast | ( | ) |
Definition at line 2001 of file IRCore.cpp.
References get(), and mlirPythonValueToCapsule().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
|
inline |