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

A list of operation attributes. More...

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

Public Member Functions

 PyOpAttributeMap (PyOperationRef operation)
nanobind::typed< nanobind::object, PyAttributedunderGetItemNamed (const std::string &name)
PyNamedAttribute dunderGetItemIndexed (intptr_t index)
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, llvm::function_ref< void(MlirStringRef, MlirAttribute)> fn)
static void bind (nanobind::module_ &m)

Detailed Description

A list of operation attributes.

Can be indexed by name, producing attributes, or by index, producing named attributes.

Definition at line 1794 of file IRCore.h.

Constructor & Destructor Documentation

◆ PyOpAttributeMap()

mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::PyOpAttributeMap ( PyOperationRef operation)
inline

Definition at line 1796 of file IRCore.h.

Member Function Documentation

◆ bind()

void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::bind ( nanobind::module_ & m)
static

◆ dunderContains()

bool mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderContains ( const std::string & name)

Definition at line 2418 of file IRCore.cpp.

References mlirOperationGetNumAttributes().

◆ dunderDelItem()

void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderDelItem ( const std::string & name)

◆ dunderGetItemIndexed()

PyNamedAttribute mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderGetItemIndexed ( intptr_t index)

Definition at line 2386 of file IRCore.cpp.

◆ dunderGetItemNamed()

nb::typed< nb::object, PyAttribute > mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderGetItemNamed ( const std::string & name)

◆ dunderLen()

intptr_t mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderLen ( )

◆ dunderSetItem()

void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::dunderSetItem ( const std::string & name,
const PyAttribute & attr )

Definition at line 2401 of file IRCore.cpp.

References mlirIdentifierStr().

◆ forEachAttr()

void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpAttributeMap::forEachAttr ( MlirOperation op,
llvm::function_ref< void(MlirStringRef, MlirAttribute)> fn )
static

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