MLIR  19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::detail::DenseResourceElementsAttrBase< T > Class Template Reference

Base class for DenseResourceElementsAttr that is instantiated and specialized for each supported element type below. More...

#include "mlir/IR/BuiltinAttributes.h"

+ Inheritance diagram for mlir::detail::DenseResourceElementsAttrBase< T >:

Public Member Functions

std::optional< ArrayRef< T > > tryGetAsArrayRef () const
 Return the data of this attribute as an ArrayRef<T> if it is present, returns std::nullopt otherwise. More...
 

Static Public Member Functions

static DenseResourceElementsAttrBase< T > get (ShapedType type, StringRef blobName, AsmResourceBlob blob)
 A builder that inserts a new resource using the provided blob. More...
 
static bool classof (Attribute attr)
 Support for isa<>/cast<>. More...
 

Detailed Description

template<typename T>
class mlir::detail::DenseResourceElementsAttrBase< T >

Base class for DenseResourceElementsAttr that is instantiated and specialized for each supported element type below.

Definition at line 780 of file BuiltinAttributes.h.

Member Function Documentation

◆ classof()

template<typename T >
bool DenseResourceElementsAttrBase::classof ( Attribute  attr)
static

Support for isa<>/cast<>.

Definition at line 1624 of file BuiltinAttributes.cpp.

◆ get()

template<typename T >
DenseResourceElementsAttrBase< T > DenseResourceElementsAttrBase::get ( ShapedType  type,
StringRef  blobName,
AsmResourceBlob  blob 
)
static

A builder that inserts a new resource using the provided blob.

The handle of the inserted blob is used when building the attribute. The provided blobName is used as a hint for the key of the new handle for the blob resource, but may be changed if necessary to ensure uniqueness during insertion.

Definition at line 1602 of file BuiltinAttributes.cpp.

References mlir::get(), mlir::AsmResourceBlob::getData(), and mlir::AsmResourceBlob::getDataAlignment().

◆ tryGetAsArrayRef()

template<typename T >
std::optional< ArrayRef< T > > DenseResourceElementsAttrBase::tryGetAsArrayRef

Return the data of this attribute as an ArrayRef<T> if it is present, returns std::nullopt otherwise.

Definition at line 1617 of file BuiltinAttributes.cpp.


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