|
MLIR 22.0.0git
|
An attribute representing a reference to a dense vector or tensor object containing strings. More...
#include "IR/AttributeDetail.h"
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. | |
| Public Member Functions inherited from mlir::detail::DenseElementsAttributeStorage | |
| DenseElementsAttributeStorage (ShapedType type, bool isSplat) | |
| Public Member Functions inherited from mlir::AttributeStorage | |
| const AbstractAttribute & | getAbstractAttribute () const |
| Return the abstract descriptor for this attribute. | |
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. | |
| static llvm::hash_code | hashKey (const KeyTy &key) |
| Hash the key for the storage. | |
| static DenseStringElementsAttrStorage * | construct (AttributeStorageAllocator &allocator, KeyTy key) |
| Construct a new storage instance. | |
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. | |
| void | initialize (MLIRContext *context) |
| Default initialization for attribute storage classes that require no additional initialization. | |
| Protected Member Functions inherited from mlir::StorageUniquer::BaseStorage | |
| BaseStorage ()=default | |
An attribute representing a reference to a dense vector or tensor object containing strings.
Definition at line 203 of file AttributeDetail.h.
|
inline |
Definition at line 204 of file AttributeDetail.h.
References data, mlir::detail::DenseElementsAttributeStorage::DenseElementsAttributeStorage(), and mlir::detail::DenseElementsAttributeStorage::isSplat.
Referenced by construct().
|
inlinestatic |
Construct a new storage instance.
Definition at line 276 of file AttributeDetail.h.
References mlir::StorageUniquer::StorageAllocator::allocate(), copy(), data, mlir::detail::DenseStringElementsAttrStorage::KeyTy::data, DenseStringElementsAttrStorage(), mlir::detail::DenseStringElementsAttrStorage::KeyTy::isSplat, and mlir::detail::DenseStringElementsAttrStorage::KeyTy::type.
|
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 240 of file AttributeDetail.h.
References data.
|
inlinestatic |
Hash the key for the storage.
Definition at line 270 of file AttributeDetail.h.
References mlir::detail::DenseStringElementsAttrStorage::KeyTy::hashCode, and mlir::detail::DenseStringElementsAttrStorage::KeyTy::type.
Compare this storage instance with the provided key.
Definition at line 227 of file AttributeDetail.h.
References data, mlir::detail::DenseStringElementsAttrStorage::KeyTy::data, mlir::detail::DenseElementsAttributeStorage::type, and mlir::detail::DenseStringElementsAttrStorage::KeyTy::type.
| ArrayRef<StringRef> mlir::detail::DenseStringElementsAttrStorage::data |
Definition at line 315 of file AttributeDetail.h.
Referenced by construct(), DenseStringElementsAttrStorage(), getKey(), and operator==().