My Project
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mlir::detail::DenseElementsAttributeStorage Struct Reference

An attribute representing a reference to a dense vector or tensor object. More...

#include <AttributeDetail.h>

Inheritance diagram for mlir::detail::DenseElementsAttributeStorage:
Inheritance graph
[legend]
Collaboration diagram for mlir::detail::DenseElementsAttributeStorage:
Collaboration graph
[legend]

Classes

struct  KeyTy
 

Public Member Functions

 DenseElementsAttributeStorage (ShapedType ty, ArrayRef< char > data, bool isSplat=false)
 
bool operator== (const KeyTy &key) const
 Compare this storage instance with the provided key. More...
 
- Public Member Functions inherited from mlir::AttributeStorage
Type getType () const
 Get the type of this attribute. More...
 
DialectgetDialect () const
 Get the dialect of this attribute. More...
 
- Public Member Functions inherited from mlir::StorageUniquer::BaseStorage
unsigned getKind () const
 Get the kind classification of this storage. More...
 

Static Public Member Functions

static KeyTy getKey (ShapedType ty, ArrayRef< char > data, bool isKnownSplat)
 
static KeyTy getKeyForBoolData (ShapedType ty, ArrayRef< char > data, size_t numElements)
 Construct a key with a set of boolean data. More...
 
static llvm::hash_code hashKey (const KeyTy &key)
 Hash the key for the storage. More...
 
static DenseElementsAttributeStorageconstruct (AttributeStorageAllocator &allocator, KeyTy key)
 Construct a new storage instance. More...
 

Public Attributes

ArrayRef< char > data
 
bool isSplat
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::AttributeStorage
 AttributeStorage (Type type)
 
 AttributeStorage ()
 
void setType (Type type)
 Set the type of this attribute. More...
 
void initializeDialect (Dialect &newDialect)
 
- Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage
 BaseStorage ()
 

Detailed Description

An attribute representing a reference to a dense vector or tensor object.

Constructor & Destructor Documentation

◆ DenseElementsAttributeStorage()

mlir::detail::DenseElementsAttributeStorage::DenseElementsAttributeStorage ( ShapedType  ty,
ArrayRef< char >  data,
bool  isSplat = false 
)
inline

Member Function Documentation

◆ construct()

static DenseElementsAttributeStorage* mlir::detail::DenseElementsAttributeStorage::construct ( AttributeStorageAllocator allocator,
KeyTy  key 
)
inlinestatic

Construct a new storage instance.

◆ getKey()

static KeyTy mlir::detail::DenseElementsAttributeStorage::getKey ( ShapedType  ty,
ArrayRef< char >  data,
bool  isKnownSplat 
)
inlinestatic

Construct a key from a shaped type, raw data buffer, and a flag that signals if the data is already known to be a splat. Callers to this function are expected to tag preknown splat values when possible, e.g. one element shapes.

◆ getKeyForBoolData()

static KeyTy mlir::detail::DenseElementsAttributeStorage::getKeyForBoolData ( ShapedType  ty,
ArrayRef< char >  data,
size_t  numElements 
)
inlinestatic

Construct a key with a set of boolean data.

◆ hashKey()

static llvm::hash_code mlir::detail::DenseElementsAttributeStorage::hashKey ( const KeyTy key)
inlinestatic

Hash the key for the storage.

◆ operator==()

bool mlir::detail::DenseElementsAttributeStorage::operator== ( const KeyTy key) const
inline

Compare this storage instance with the provided key.

Member Data Documentation

◆ data

ArrayRef<char> mlir::detail::DenseElementsAttributeStorage::data

◆ isSplat

bool mlir::detail::DenseElementsAttributeStorage::isSplat

The documentation for this struct was generated from the following file: