MLIR 22.0.0git
mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlock Class Reference

Wrapper around an MlirBlock. More...

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

Public Member Functions

 PyBlock (PyOperationRef parentOperation, MlirBlock block)
MlirBlock get ()
PyOperationRefgetParentOperation ()
void checkValid ()
nanobind::object getCapsule ()
 Gets a capsule wrapping the void* within the MlirBlock.

Detailed Description

Wrapper around an MlirBlock.

Blocks are managed completely by their containing operation. Unlike the C++ API, the python API does not support detached blocks.

Definition at line 810 of file IRCore.h.

Constructor & Destructor Documentation

◆ PyBlock()

mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlock::PyBlock ( PyOperationRef parentOperation,
MlirBlock block )
inline

Definition at line 812 of file IRCore.h.

References mlirBlockIsNull().

Member Function Documentation

◆ checkValid()

◆ get()

MlirBlock mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlock::get ( )
inline

◆ getCapsule()

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

Gets a capsule wrapping the void* within the MlirBlock.

Definition at line 189 of file IRCore.cpp.

References get(), and mlirPythonBlockToCapsule().

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

◆ getParentOperation()

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

Definition at line 818 of file IRCore.h.


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