MLIR  15.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
mlir::DenseIntElementsAttr Class Reference

An attribute that represents a reference to a dense integer vector or tensor object. More...

#include "mlir/IR/BuiltinAttributes.h"

+ Inheritance diagram for mlir::DenseIntElementsAttr:
+ Collaboration diagram for mlir::DenseIntElementsAttr:

Public Types

using iterator = DenseElementsAttr::IntElementIterator
 DenseIntElementsAttr iterates on APInt, so we can use the raw element iterator directly. More...
 

Public Member Functions

DenseElementsAttr mapValues (Type newElementType, function_ref< APInt(const APInt &)> mapping) const
 Generates a new DenseElementsAttr by mapping each value attribute, and constructing the DenseElementsAttr given the new element type. More...
 
iterator begin () const
 Iterator access to the integer element values. More...
 
iterator end () const
 

Static Public Member Functions

template<typename Arg >
static DenseIntElementsAttr get (const ShapedType &type, Arg &&arg)
 Get an instance of a DenseIntElementsAttr with the given arguments. More...
 
template<typename T >
static DenseIntElementsAttr get (const ShapedType &type, const std::initializer_list< T > &list)
 
static bool classof (Attribute attr)
 Method for supporting type inquiry through isa, cast and dyn_cast. More...
 

Detailed Description

An attribute that represents a reference to a dense integer vector or tensor object.

Definition at line 907 of file BuiltinAttributes.h.

Member Typedef Documentation

◆ iterator

DenseIntElementsAttr iterates on APInt, so we can use the raw element iterator directly.

Definition at line 911 of file BuiltinAttributes.h.

Member Function Documentation

◆ begin()

iterator mlir::DenseIntElementsAttr::begin ( ) const
inline

Iterator access to the integer element values.

Definition at line 935 of file BuiltinAttributes.h.

Referenced by getLocalInvocationDimSize().

◆ classof()

bool DenseIntElementsAttr::classof ( Attribute  attr)
static

◆ end()

iterator mlir::DenseIntElementsAttr::end ( ) const
inline

Definition at line 936 of file BuiltinAttributes.h.

References getNumElements().

◆ get() [1/2]

template<typename Arg >
static DenseIntElementsAttr mlir::DenseIntElementsAttr::get ( const ShapedType &  type,
Arg &&  arg 
)
inlinestatic

◆ get() [2/2]

template<typename T >
static DenseIntElementsAttr mlir::DenseIntElementsAttr::get ( const ShapedType &  type,
const std::initializer_list< T > &  list 
)
inlinestatic

Definition at line 923 of file BuiltinAttributes.h.

References mlir::DenseElementsAttr::get().

◆ mapValues()

DenseElementsAttr DenseIntElementsAttr::mapValues ( Type  newElementType,
function_ref< APInt(const APInt &)>  mapping 
) const

Generates a new DenseElementsAttr by mapping each value attribute, and constructing the DenseElementsAttr given the new element type.

Definition at line 1531 of file BuiltinAttributes.cpp.

References mlir::AttributeStorage::getType(), and mappingHelper().


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