All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
blaze::AlignedStorage< T > Class Template Reference

POD data type with a fixed alignment.The AlignedStorage class template represents a POD data type with a fixed alignment. Via this class it is possible to enforce a specific, type-based alignment for static data types. The required alignment is evaluated based on the given data type T. In case T is a built-in, vectorizable data type, AlignedStorage enforces an alignment of 16 or 32 bytes, depending on the active SSE/AVX level. In all other cases, no specific alignment is enforced. More...

#include <AlignedStorage.h>

Inherits AlignedStorageHelper< AlignmentTrait< T >::value >.

Detailed Description

template<typename T>
class blaze::AlignedStorage< T >

POD data type with a fixed alignment.

The AlignedStorage class template represents a POD data type with a fixed alignment. Via this class it is possible to enforce a specific, type-based alignment for static data types. The required alignment is evaluated based on the given data type T. In case T is a built-in, vectorizable data type, AlignedStorage enforces an alignment of 16 or 32 bytes, depending on the active SSE/AVX level. In all other cases, no specific alignment is enforced.

In the following code example, the StaticVector class, representing a vector of N statically allocated elements, is non-publicly deriving from the AlignedStorage class template. By this, the N data elements of type T are aligned according to the requirements of T.

template< typename T, size_t N >
class StaticVector : private AlignedStorage<T>
{
// ...
T v_[N];
};

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