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

Refinement of the PyDenseElementsAttribute for attributes containing integer (and boolean) values. More...

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

Inheritance diagram for mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseIntElementsAttribute:

Public Member Functions

nanobind::int_ dunderGetItem (intptr_t pos) const
 Returns the element at the given linear position.
 PyConcreteAttribute ()=default
 PyConcreteAttribute (PyMlirContextRef contextRef, MlirAttribute attr)
 PyConcreteAttribute (PyAttribute &orig)
Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseIntElementsAttribute, PyDenseElementsAttribute >
 PyConcreteAttribute ()=default
Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute
intptr_t dunderLen () const
std::unique_ptr< nb_buffer_infoaccessBuffer ()
 PyConcreteAttribute ()=default
 PyConcreteAttribute (PyMlirContextRef contextRef, MlirAttribute attr)
 PyConcreteAttribute (PyAttribute &orig)
Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseElementsAttribute >
 PyConcreteAttribute ()=default
Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAttribute
 PyAttribute (PyMlirContextRef contextRef, MlirAttribute attr)
bool operator== (const PyAttribute &other) const
 operator MlirAttribute () const
MlirAttribute get () const
nanobind::object getCapsule ()
 Gets a capsule wrapping the void* within the MlirAttribute.
nanobind::typed< nanobind::object, PyAttributemaybeDownCast ()
Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::BaseContextObject
 BaseContextObject (PyMlirContextRef ref)
PyMlirContextRefgetContext ()
 Accesses the context reference.

Static Public Member Functions

static void bindDerived (ClassTy &c)
Static Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseIntElementsAttribute, PyDenseElementsAttribute >
static MlirAttribute castFrom (PyAttribute &orig)
static void bind (nanobind::module_ &m, PyType_Slot *slots=nullptr)
static void bindDerived (ClassTy &m)
 Implemented by derived classes to add methods to the Python subclass.
Static Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute
static PyDenseElementsAttribute getFromList (const nanobind::list &attributes, std::optional< PyType > explicitType, DefaultingPyMlirContext contextWrapper)
static PyDenseElementsAttribute getFromBuffer (const nb_buffer &array, bool signless, const std::optional< PyType > &explicitType, std::optional< std::vector< int64_t > > explicitShape, DefaultingPyMlirContext contextWrapper)
static PyDenseElementsAttribute getSplat (const PyType &shapedType, PyAttribute &elementAttr)
static void bindDerived (ClassTy &c)
Static Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseElementsAttribute >
static MlirAttribute castFrom (PyAttribute &orig)
static void bind (nanobind::module_ &m, PyType_Slot *slots=nullptr)
static void bindDerived (ClassTy &m)
 Implemented by derived classes to add methods to the Python subclass.
Static Public Member Functions inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyAttribute
static PyAttribute createFromCapsule (const nanobind::object &capsule)
 Creates a PyAttribute from the MlirAttribute wrapped by a capsule.

Static Public Attributes

static constexpr IsAFunctionTy isaFunction = mlirAttributeIsADenseIntElements
static constexpr const char * pyClassName = "DenseIntElementsAttr"
Static Public Attributes inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseIntElementsAttribute, PyDenseElementsAttribute >
static constexpr GetTypeIDFunctionTy getTypeIdFunction
static const MlirStringRef name
Static Public Attributes inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseElementsAttribute
static constexpr IsAFunctionTy isaFunction = mlirAttributeIsADenseElements
static constexpr const char * pyClassName = "DenseElementsAttr"
static PyType_Slot slots []
Static Public Attributes inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseElementsAttribute >
static constexpr GetTypeIDFunctionTy getTypeIdFunction
static const MlirStringRef name

Additional Inherited Members

Public Types inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseIntElementsAttribute, PyDenseElementsAttribute >
using ClassTy
using IsAFunctionTy
using GetTypeIDFunctionTy
using Base
Public Types inherited from mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< PyDenseElementsAttribute >
using ClassTy
using IsAFunctionTy
using GetTypeIDFunctionTy
using Base

Detailed Description

Refinement of the PyDenseElementsAttribute for attributes containing integer (and boolean) values.

Supports element access.

Definition at line 495 of file IRAttributes.h.

Member Function Documentation

◆ bindDerived()

void mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseIntElementsAttribute::bindDerived ( ClassTy & c)
static

Definition at line 1026 of file IRAttributes.cpp.

References dunderGetItem().

◆ dunderGetItem()

◆ PyConcreteAttribute() [1/3]

◆ PyConcreteAttribute() [2/3]

Definition at line 1076 of file IRCore.h.

◆ PyConcreteAttribute() [3/3]

mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyConcreteAttribute< DerivedTy, BaseTy >::PyConcreteAttribute ( PyMlirContextRef contextRef,
MlirAttribute attr )
inline

Definition at line 1074 of file IRCore.h.

Member Data Documentation

◆ isaFunction

IsAFunctionTy mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseIntElementsAttribute::isaFunction = mlirAttributeIsADenseIntElements
staticconstexpr

◆ pyClassName

const char* mlir::python::MLIR_BINDINGS_PYTHON_DOMAIN::PyDenseIntElementsAttribute::pyClassName = "DenseIntElementsAttr"
staticconstexpr

Definition at line 500 of file IRAttributes.h.


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