A helper class to describe some properties regarding the storage class wrapped in a VctrBase instance.
More...
template<class StorageType>
struct vctr::StorageInfo< StorageType >
A helper class to describe some properties regarding the storage class wrapped in a VctrBase instance.
VctrBase expects a suitable storage info to supply three member variables
- memberAlignment: Specifies the alignment requirement of the storage member of the VctrBase instance. The default case is simply alignof (StorageType). Can be used to make memory aligned when the StorageType wraps a stack memory buffer, such as std::array. Must be static constexpr.
- dataIsSIMDAligned: Specifies if the data is aligned for AVX access (x64) or Neon access (ARM).
- hasSIMDExtendedStorage: Specifies if the actually allocated memory is extended with unused dummy values at the end in a way that it is a multiple of the size of an AVX register (x64) or Neon register (ARM).
There are template specialisations for std::vector with an AlignedAllocator and std::array, which define all variable as static constexpr in order to make this struct as lightweight as possible in most cases.