VCTR
Loading...
Searching...
No Matches
vctr::StorageInfo< StorageType > Struct Template Reference

A helper class to describe some properties regarding the storage class wrapped in a VctrBase instance. More...

Inheritance diagram for vctr::StorageInfo< StorageType >:
vctr::VctrBase< ElementType, StorageType, extent, StorageInfoType > vctr::Array< std::unique_ptr< OwnedElementType >, extent > vctr::Vector< std::unique_ptr< OwnedElementType > > vctr::Array< ElementType, extent, storageExtent > vctr::Span< ElementType, extent, StorageInfoType > vctr::Vector< ElementType, Allocator > vctr::OwnedArray< OwnedElementType, extent > vctr::OwnedVector< OwnedElementType >

Detailed Description

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.


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