boost::simd::preferred_alignment< T, Cardinal > Struct Template Reference

Description

template<typename T, std::size_t Cardinal = 0ULL>
struct boost::simd::preferred_alignment< T, Cardinal >

Computes the preferred alignment for any type T vectorized with a given cardinal Cardinal.

This alignment is computed by the following formula:

  • if T is Vectorizable, uses the alignment of a pack<T,Cardinal>
  • if T is Vectorized, uses T::alignment directly
  • if T is not Vectorizable, uses either the preferred alignment of its underlying value type (as computed by value_of) or its own natural alignment (as computed by alignof)

If Cardinal is unspecified, all computations are performed by assuming th default cardinal of current architecture Vectorized types is used.

Template Parameters
TType of data to be allocated
CardinalCardinal of the pack to be used in the allocated memory.