|
MLIR 22.0.0git
|
A list of operation operands. More...
#include "mlir/Bindings/Python/IRCore.h"
Public Types | |
| using | SliceableT = Sliceable<PyOpOperandList, PyValue> |
Public Member Functions | |
| PyOpOperandList (PyOperationRef operation, intptr_t startIndex=0, intptr_t length=-1, intptr_t step=1) | |
| void | dunderSetItem (intptr_t index, PyValue value) |
| Public Member Functions inherited from mlir::Sliceable< PyOpOperandList, PyValue > | |
| Sliceable (intptr_t startIndex, intptr_t length, intptr_t step) | |
| PyValue | getElement (intptr_t index) |
| Returns the index-th element in the slice, supports negative indices. | |
| intptr_t | size () |
| Returns the size of slice. | |
| std::vector< PyValue > | dunderAdd (PyOpOperandList &other) |
| Returns a new vector (mapped to Python list) containing elements from two slices. | |
Static Public Member Functions | |
| static void | bindDerived (ClassTy &c) |
| Static Public Member Functions inherited from mlir::Sliceable< PyOpOperandList, PyValue > | |
| static void | bind (nanobind::module_ &m) |
| Binds the indexing and length methods in the Python class. | |
| static void | bindDerived (ClassTy &) |
| Hook for derived classes willing to bind more methods. | |
Static Public Attributes | |
| static constexpr const char * | pyClassName = "OpOperandList" |
Friends | |
| class | Sliceable< PyOpOperandList, PyValue > |
| Give the parent CRTP class access to hook implementations below. | |
Additional Inherited Members | |
| Public Attributes inherited from mlir::Sliceable< PyOpOperandList, PyValue > | |
| intptr_t | startIndex |
| intptr_t | length |
| intptr_t | step |
| Protected Types inherited from mlir::Sliceable< PyOpOperandList, PyValue > | |
| using | ClassTy |
| using | has_maybe_downcast |
| Trait to check if T provides a maybeDownCast method. | |
| Protected Member Functions inherited from mlir::Sliceable< PyOpOperandList, PyValue > | |
| intptr_t | wrapIndex (intptr_t index) |
| Transforms index into a legal value to access the underlying sequence. | |
| intptr_t | linearizeIndex (intptr_t index) |
| Computes the linear index given the current slice properties. | |
| nanobind::object | getItem (intptr_t index) |
| Returns the element at the given slice index. | |
| nanobind::object | getItemSlice (PyObject *slice) |
| Returns a new instance of the pseudo-container restricted to the given slice. | |
A list of operation operands.
Internally, these are stored as consecutive elements, random access is cheap. The (returned) operand list is associated with the operation whose operands these are, and thus extends the lifetime of this operation.
| mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpOperandList::PyOpOperandList | ( | PyOperationRef | operation, |
| intptr_t | startIndex = 0, | ||
| intptr_t | length = -1, | ||
| intptr_t | step = 1 ) |
Definition at line 2252 of file IRCore.cpp.
References mlir::Sliceable< PyOpOperandList, PyValue >::length, mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyBlockArgumentList::PyBlockArgumentList(), mlir::Sliceable< PyOpOperandList, PyValue >::startIndex, and mlir::Sliceable< PyOpOperandList, PyValue >::step.
Referenced by mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpSuccessors::PyOpSuccessors(), and Sliceable< PyOpOperandList, PyValue >.
Definition at line 2265 of file IRCore.cpp.
References mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyValue::get(), mlirOperationSetOperand(), and mlir::Sliceable< PyOpOperandList, PyValue >::wrapIndex().
Referenced by Sliceable< PyOpOperandList, PyValue >.
| void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyOpOperandList::dunderSetItem | ( | intptr_t | index, |
| PyValue | value ) |
Definition at line 2260 of file IRCore.cpp.
References mlir::get(), mlir::Sliceable< PyOpOperandList, PyValue >::length, mlirOperationGetNumOperands(), and mlir::Sliceable< PyOpOperandList, PyValue >::step.
|
friend |
Give the parent CRTP class access to hook implementations below.
Definition at line 1687 of file IRCore.h.
References bindDerived(), mlir::Sliceable< PyOpOperandList, PyValue >::length, PyOpOperandList(), mlir::Sliceable< PyOpOperandList, PyValue >::Sliceable(), mlir::Sliceable< PyOpOperandList, PyValue >::startIndex, and mlir::Sliceable< PyOpOperandList, PyValue >::step.
|
staticconstexpr |