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

Wrapper around an MlirBlock. More...

#include "Bindings/Python/IRModule.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 813 of file IRModule.h.

Constructor & Destructor Documentation

◆ PyBlock()

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

Definition at line 815 of file IRModule.h.

References mlirBlockIsNull().

Member Function Documentation

◆ checkValid()

void mlir::python::PyBlock::checkValid ( )
inline

Definition at line 823 of file IRModule.h.

◆ get()

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

Definition at line 820 of file IRModule.h.

Referenced by getCapsule().

◆ getCapsule()

nb::object PyBlock::getCapsule ( )

Gets a capsule wrapping the void* within the MlirBlock.

Definition at line 196 of file IRCore.cpp.

References get(), and mlirPythonBlockToCapsule().

◆ getParentOperation()

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

Definition at line 821 of file IRModule.h.


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