My Project
Public Types | Public Member Functions | Static Public Member Functions | List of all members
mlir::OpaqueElementsAttr Class Reference

#include <Attributes.h>

Inheritance diagram for mlir::OpaqueElementsAttr:
Inheritance graph
[legend]
Collaboration diagram for mlir::OpaqueElementsAttr:
Collaboration graph
[legend]

Public Types

using ValueType = StringRef
 
- Public Types inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
using Base = StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
 Utility declarations for the concrete attribute class. More...
 
using ImplType = StorageT
 

Public Member Functions

StringRef getValue () const
 
Attribute getValue (ArrayRef< uint64_t > index) const
 
bool decode (ElementsAttr &result)
 
DialectgetDialect () const
 Returns dialect associated with this opaque constant. More...
 

Static Public Member Functions

static OpaqueElementsAttr get (Dialect *dialect, ShapedType type, StringRef bytes)
 
static bool kindof (unsigned kind)
 Method for support type inquiry through isa, cast and dyn_cast. More...
 
- Static Public Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
static ClassIDgetClassID ()
 Return a unique identifier for the concrete type. More...
 
template<typename T >
static bool classof (T val)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
ImplTypegetImpl () const
 Utility for easy access to the storage instance. More...
 
- Static Protected Member Functions inherited from mlir::detail::StorageUserBase< ConcreteT, BaseT, StorageT, UniquerT >
template<typename... Args>
static ConcreteT get (MLIRContext *ctx, unsigned kind, Args... args)
 
template<typename... Args>
static ConcreteT getChecked (const Location &loc, MLIRContext *ctx, unsigned kind, Args... args)
 
template<typename... Args>
static LogicalResult verifyConstructionInvariants (Args... args)
 Default implementation that just returns success. More...
 

Detailed Description

An opaque attribute that represents a reference to a vector or tensor constant with opaque content. This representation is for tensor constants which the compiler may not need to interpret. This attribute is always associated with a particular dialect, which provides a method to convert tensor representation to a non-opaque format.

Member Typedef Documentation

◆ ValueType

Member Function Documentation

◆ decode()

bool OpaqueElementsAttr::decode ( ElementsAttr result)

Decodes the attribute value using dialect-specific decoding hook. Returns false if decoding is successful. If not, returns true and leaves 'result' argument unspecified.

◆ get()

OpaqueElementsAttr OpaqueElementsAttr::get ( Dialect dialect,
ShapedType  type,
StringRef  bytes 
)
static

◆ getDialect()

Dialect * OpaqueElementsAttr::getDialect ( ) const

Returns dialect associated with this opaque constant.

◆ getValue() [1/2]

StringRef OpaqueElementsAttr::getValue ( ) const

◆ getValue() [2/2]

Attribute OpaqueElementsAttr::getValue ( ArrayRef< uint64_t >  index) const

Return the value at the given index. The 'index' is expected to refer to a valid element.

Return the value at the given index. If index does not refer to a valid element, then a null attribute is returned.

◆ kindof()

static bool mlir::OpaqueElementsAttr::kindof ( unsigned  kind)
inlinestatic

Method for support type inquiry through isa, cast and dyn_cast.


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