MLIR  18.0.0git
Public Member Functions | List of all members
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 ()
pybind11::object getCapsule ()
 Gets a capsule wrapping the void* within the MlirBlock. More...

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 801 of file IRModule.h.

Constructor & Destructor Documentation

◆ PyBlock()

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

Definition at line 803 of file IRModule.h.

References mlirBlockIsNull().

Member Function Documentation

◆ checkValid()

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

Definition at line 811 of file IRModule.h.

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

◆ get()

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

◆ getCapsule()

py::object PyBlock::getCapsule ( )

Gets a capsule wrapping the void* within the MlirBlock.

Definition at line 278 of file IRCore.cpp.

References mlir::get(), and mlirPythonBlockToCapsule().

◆ getParentOperation()

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

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