|
MLIR 22.0.0git
|
Blocks are exposed by the C-API as a forward-only linked list. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Member Functions | |
| PyBlockList (PyOperationRef operation, MlirRegion region) | |
| PyBlockIterator | dunderIter () |
| intptr_t | dunderLen () |
| PyBlock | dunderGetItem (intptr_t index) |
| PyBlock | appendBlock (const nanobind::args &pyArgTypes, const std::optional< nanobind::sequence > &pyArgLocs) |
Static Public Member Functions | |
| static void | bind (nanobind::module_ &m) |
Blocks are exposed by the C-API as a forward-only linked list.
In Python, we present them as a more full-featured list-like container but optimize it for forward iteration. Blocks are always owned by a region.
|
inline |
| PyBlock mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockList::appendBlock | ( | const nanobind::args & | pyArgTypes, |
| const std::optional< nanobind::sequence > & | pyArgLocs ) |
Definition at line 301 of file IRCore.cpp.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlock::checkValid(), mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::createBlock(), and mlirRegionAppendOwnedBlock().
Referenced by bind().
|
static |
Definition at line 309 of file IRCore.cpp.
References appendBlock(), dunderGetItem(), dunderIter(), and dunderLen().
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
Definition at line 282 of file IRCore.cpp.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlock::checkValid(), dunderLen(), mlirBlockGetNextInRegion(), mlirBlockIsNull(), and mlirRegionGetFirstBlock().
Referenced by bind().
| PyBlockIterator mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockList::dunderIter | ( | ) |
Definition at line 266 of file IRCore.cpp.
References mlirRegionGetFirstBlock().
Referenced by bind().
| intptr_t mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockList::dunderLen | ( | ) |
Definition at line 271 of file IRCore.cpp.
References mlirBlockGetNextInRegion(), mlirBlockIsNull(), and mlirRegionGetFirstBlock().
Referenced by bind(), and dunderGetItem().