|
MLIR 23.0.0git
|
A list of operation attributes. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Member Functions | |
| PyOpAttributeMap (PyOperationRef operation) | |
| nanobind::typed< nanobind::object, PyAttribute > | dunderGetItemNamed (const std::string &name) |
| PyNamedAttribute | dunderGetItemIndexed (intptr_t index) |
| nanobind::typed< nanobind::object, std::optional< PyAttribute > > | get (const std::string &key, nanobind::object defaultValue) |
| void | dunderSetItem (const std::string &name, const PyAttribute &attr) |
| void | dunderDelItem (const std::string &name) |
| intptr_t | dunderLen () |
| bool | dunderContains (const std::string &name) |
Static Public Member Functions | |
| static void | forEachAttr (MlirOperation op, std::function< void(MlirStringRef, MlirAttribute)> fn) |
| static void | bind (nanobind::module_ &m) |
A list of operation attributes.
Can be indexed by name, producing attributes, or by index, producing named attributes.
|
inline |
|
static |
Definition at line 2429 of file IRCore.cpp.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::populateIRCore().
| bool mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderContains | ( | const std::string & | name | ) |
Definition at line 2414 of file IRCore.cpp.
References mlirOperationGetNumAttributes().
| void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderDelItem | ( | const std::string & | name | ) |
Definition at line 2403 of file IRCore.cpp.
References mlirOperationSetAttributeByName(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::toMlirStringRef().
| PyNamedAttribute mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderGetItemIndexed | ( | intptr_t | index | ) |
Definition at line 2382 of file IRCore.cpp.
| nb::typed< nb::object, PyAttribute > mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderGetItemNamed | ( | const std::string & | name | ) |
Definition at line 2364 of file IRCore.cpp.
References mlir::Sliceable< PyBlockPredecessors, PyBlock >::length, mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockPredecessors::PyBlockPredecessors(), mlir::Sliceable< PyBlockPredecessors, PyBlock >::startIndex, and mlir::Sliceable< PyBlockPredecessors, PyBlock >::step.
| intptr_t mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderLen | ( | ) |
Definition at line 2410 of file IRCore.cpp.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::toMlirStringRef().
| void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderSetItem | ( | const std::string & | name, |
| const PyAttribute & | attr ) |
Definition at line 2397 of file IRCore.cpp.
References mlirIdentifierStr().
|
static |
Definition at line 2419 of file IRCore.cpp.
References mlirOperationGetAttributeByName(), and mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::toMlirStringRef().
| nb::typed< nb::object, std::optional< PyAttribute > > mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::get | ( | const std::string & | key, |
| nanobind::object | defaultValue ) |
Definition at line 2374 of file IRCore.cpp.