MLIR  17.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::python::PyValue Class Reference

Wrapper around the generic MlirValue. More...

#include "Bindings/Python/IRModule.h"

Public Member Functions

 PyValue (PyOperationRef parentOperation, MlirValue value)
 operator MlirValue () const
MlirValue get ()
PyOperationRefgetParentOperation ()
void checkValid ()
pybind11::object getCapsule ()
 Gets a capsule wrapping the void* within the MlirValue. More...

Static Public Member Functions

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

Detailed Description

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).

Definition at line 1033 of file IRModule.h.

Constructor & Destructor Documentation

◆ PyValue()

mlir::python::PyValue::PyValue ( PyOperationRef  parentOperation,
MlirValue  value 

Definition at line 1035 of file IRModule.h.

Referenced by createFromCapsule().

Member Function Documentation

◆ checkValid()

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

Definition at line 1042 of file IRModule.h.

References mlir::python::PyOperation::checkValid().

◆ createFromCapsule()

PyValue PyValue::createFromCapsule ( pybind11::object  capsule)

◆ get()

MlirValue mlir::python::PyValue::get ( )

Definition at line 1039 of file IRModule.h.

Referenced by getCapsule().

◆ getCapsule()

pybind11::object PyValue::getCapsule ( )

Gets a capsule wrapping the void* within the MlirValue.

Definition at line 1850 of file IRCore.cpp.

References get(), and mlirPythonValueToCapsule().

◆ getParentOperation()

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

Definition at line 1040 of file IRModule.h.

◆ operator MlirValue()

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

Definition at line 1037 of file IRModule.h.

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