MLIR  20.0.0git
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mlir::detail::DenseStringElementsAttrStorage Struct Reference

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

#include "IR/AttributeDetail.h"

+ Inheritance diagram for mlir::detail::DenseStringElementsAttrStorage:

Classes

struct  KeyTy
 

Public Member Functions

 DenseStringElementsAttrStorage (ShapedType ty, ArrayRef< StringRef > 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::detail::DenseElementsAttributeStorage
 DenseElementsAttributeStorage (ShapedType type, bool isSplat)
 
- Public Member Functions inherited from mlir::AttributeStorage
const AbstractAttributegetAbstractAttribute () const
 Return the abstract descriptor for this attribute. More...
 

Static Public Member Functions

static KeyTy getKey (ShapedType ty, ArrayRef< StringRef > data, bool isKnownSplat)
 Construct a key from a shaped type, StringRef data buffer, and a flag that signals if the data is already known to be a splat. More...
 
static llvm::hash_code hashKey (const KeyTy &key)
 Hash the key for the storage. More...
 
static DenseStringElementsAttrStorageconstruct (AttributeStorageAllocator &allocator, KeyTy key)
 Construct a new storage instance. More...
 

Public Attributes

ArrayRef< StringRef > data
 
- Public Attributes inherited from mlir::detail::DenseElementsAttributeStorage
ShapedType type
 
bool isSplat
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::AttributeStorage
void initializeAbstractAttribute (const AbstractAttribute &abstractAttr)
 Set the abstract attribute for this storage instance. More...
 
void initialize (MLIRContext *context)
 Default initialization for attribute storage classes that require no additional initialization. More...
 
- Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage
 BaseStorage ()=default
 

Detailed Description

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

Definition at line 205 of file AttributeDetail.h.

Constructor & Destructor Documentation

◆ DenseStringElementsAttrStorage()

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

Definition at line 206 of file AttributeDetail.h.

Referenced by construct().

Member Function Documentation

◆ construct()

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

◆ getKey()

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

Construct a key from a shaped type, StringRef 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.

Definition at line 242 of file AttributeDetail.h.

References data, and mlir::polynomial::hash_value().

◆ hashKey()

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

◆ operator==()

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

Member Data Documentation

◆ data

ArrayRef<StringRef> mlir::detail::DenseStringElementsAttrStorage::data

Definition at line 317 of file AttributeDetail.h.

Referenced by construct(), getKey(), and operator==().


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