|
MLIR 22.0.0git
|
An attribute representing a reference to a dense vector or tensor object. More...
#include "IR/AttributeDetail.h"
Classes | |
| struct | KeyTy |
Public Member Functions | |
| DenseIntOrFPElementsAttrStorage (ShapedType ty, ArrayRef< char > 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< char > data, bool isKnownSplat) |
| 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. | |
| static KeyTy | getKeyForBoolData (ShapedType ty, ArrayRef< char > data, size_t numElements) |
| Construct a key with a set of boolean data. | |
| static KeyTy | getKeyForSplatBoolData (ShapedType type, bool splatValue) |
| Return a key to use for a boolean splat of the given value. | |
| static llvm::hash_code | hashKey (const KeyTy &key) |
| Hash the key for the storage. | |
| static DenseIntOrFPElementsAttrStorage * | construct (AttributeStorageAllocator &allocator, KeyTy key) |
| Construct a new storage instance. | |
Public Attributes | |
| ArrayRef< char > | data |
| Public Attributes inherited from mlir::detail::DenseElementsAttributeStorage | |
| ShapedType | type |
| bool | isSplat |
Static Public Attributes | |
| static const char | kSplatTrue = ~0 |
| The values used to denote a boolean splat value. | |
| static const char | kSplatFalse = 0 |
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.
Definition at line 54 of file AttributeDetail.h.
|
inline |
Definition at line 55 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 176 of file AttributeDetail.h.
References mlir::StorageUniquer::StorageAllocator::allocate(), copy(), data, mlir::detail::DenseIntOrFPElementsAttrStorage::KeyTy::data, DenseIntOrFPElementsAttrStorage(), mlir::detail::DenseIntOrFPElementsAttrStorage::KeyTy::isSplat, and mlir::detail::DenseIntOrFPElementsAttrStorage::KeyTy::type.
|
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.
Definition at line 86 of file AttributeDetail.h.
References data, mlir::detail::getDenseElementBitWidth(), getKeyForBoolData(), and getKeyForSplatBoolData().
|
inlinestatic |
Construct a key with a set of boolean data.
Definition at line 131 of file AttributeDetail.h.
References data, getKeyForSplatBoolData(), kSplatFalse, and kSplatTrue.
Referenced by getKey().
|
inlinestatic |
Return a key to use for a boolean splat of the given value.
Definition at line 163 of file AttributeDetail.h.
References kSplatFalse, kSplatTrue, and mlir::detail::DenseElementsAttributeStorage::type.
Referenced by getKey(), and getKeyForBoolData().
|
inlinestatic |
Hash the key for the storage.
Definition at line 170 of file AttributeDetail.h.
References mlir::detail::DenseIntOrFPElementsAttrStorage::KeyTy::hashCode, and mlir::detail::DenseIntOrFPElementsAttrStorage::KeyTy::type.
Compare this storage instance with the provided key.
Definition at line 78 of file AttributeDetail.h.
References data, mlir::detail::DenseIntOrFPElementsAttrStorage::KeyTy::data, mlir::detail::DenseElementsAttributeStorage::type, and mlir::detail::DenseIntOrFPElementsAttrStorage::KeyTy::type.
| ArrayRef<char> mlir::detail::DenseIntOrFPElementsAttrStorage::data |
Definition at line 191 of file AttributeDetail.h.
Referenced by construct(), DenseIntOrFPElementsAttrStorage(), getKey(), getKeyForBoolData(), and operator==().
|
static |
Definition at line 198 of file AttributeDetail.h.
Referenced by getKeyForBoolData(), and getKeyForSplatBoolData().
|
static |
The values used to denote a boolean splat value.
Definition at line 197 of file AttributeDetail.h.
Referenced by getKeyForBoolData(), and getKeyForSplatBoolData().