35 #ifndef _BLAZE_UTIL_TYPETRAITS_ALIGNMENTOF_H_ 36 #define _BLAZE_UTIL_TYPETRAITS_ALIGNMENTOF_H_ 43 #include <type_traits> 62 template<
typename T >
63 struct AlignmentOfHelper
67 static constexpr
size_t defaultAlignment = std::alignment_of<T>::value;
72 static constexpr
size_t value =
73 #if BLAZE_AVX512BW_MODE 74 ( IsVectorizable_v<T> )?( 64UL ):( defaultAlignment );
75 #elif BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 76 ( IsVectorizable_v<T> )?(
sizeof(T) >= 4UL ? 64UL : 32UL ):( defaultAlignment );
78 ( IsVectorizable_v<T> )?( 32UL ):( defaultAlignment );
80 ( IsVectorizable_v<T> )?( 16UL ):( defaultAlignment );
96 struct AlignmentOfHelper<float>
100 static constexpr
size_t value =
101 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 108 std::alignment_of<float>::value;
122 struct AlignmentOfHelper<double>
126 static constexpr
size_t value =
127 #if BLAZE_AVX512F_MODE || BLAZE_MIC_MODE 131 #elif BLAZE_SSE2_MODE 134 std::alignment_of<double>::value;
147 template<
typename T >
148 struct AlignmentOfHelper< complex<T> >
152 static constexpr
size_t value = AlignmentOfHelper<T>::value;
178 template<
typename T >
190 template<
typename T >
203 template<
typename T >
204 struct AlignmentOf< volatile T >
205 :
public IntegralConstant<size_t,AlignmentOfHelper<T>::value>
216 template<
typename T >
217 struct AlignmentOf< const volatile T >
218 :
public IntegralConstant<size_t,AlignmentOfHelper<T>::value>
237 template<
typename T >
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:72
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the IsVectorizable type trait.
constexpr size_t AlignmentOf_v
Auxiliary variable template for the AlignmentOf type trait.The AlignmentOf_v variable template provid...
Definition: AlignmentOf.h:238
System settings for the SSE mode.
Header file for the complex data type.
Evaluation of the required alignment of the given data type.The AlignmentOf type trait template evalu...
Definition: AlignmentOf.h:179