MLIR 23.0.0git
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue Class Reference

#include "mlir/Bindings/Python/IRCore.h"

Inheritance diagram for mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue:

Public Member Functions

virtual ~PyValue ()=default
 PyValue (PyOperationRef parentOperation, MlirValue value)
 operator MlirValue () const
MlirValue get ()
PyOperationRefgetParentOperation ()
void checkValid ()
nanobind::object getCapsule ()
 Gets a capsule wrapping the void* within the MlirValue.
nanobind::typed< nanobind::object, std::variant< PyBlockArgument, PyOpResult, PyValue > > maybeDownCast ()

Static Public Member Functions

static PyValue createFromCapsule (nanobind::object capsule)
 Creates a PyValue from the MlirValue wrapped by a capsule.

Detailed Description

Definition at line 1171 of file IRCore.h.

Constructor & Destructor Documentation

◆ ~PyValue()

virtual mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue::~PyValue ( )
virtualdefault

◆ PyValue()

Member Function Documentation

◆ checkValid()

void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue::checkValid ( )
inline

Definition at line 1184 of file IRCore.h.

◆ createFromCapsule()

PyValue mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue::createFromCapsule ( nanobind::object capsule)
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 2020 of file IRCore.cpp.

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().

◆ get()

◆ getCapsule()

nb::object mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue::getCapsule ( )

Gets a capsule wrapping the void* within the MlirValue.

Definition at line 1980 of file IRCore.cpp.

Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().

◆ getParentOperation()

PyOperationRef & mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue::getParentOperation ( )
inline

◆ maybeDownCast()

nb::typed< nb::object, std::variant< PyBlockArgument, PyOpResult, PyValue > > mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue::maybeDownCast ( )

◆ operator MlirValue()

mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue::operator MlirValue ( ) const
inline

Definition at line 1179 of file IRCore.h.


The documentation for this class was generated from the following files: