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;
73 static constexpr
size_t value = ( IsVectorizable<T>::value )?( 64UL ):( defaultAlignment );
75 static constexpr
size_t value = ( IsVectorizable<T>::value )?( 32UL ):( defaultAlignment );
77 static constexpr
size_t value = ( IsVectorizable<T>::value )?( 16UL ):( defaultAlignment );
79 static constexpr
size_t value = defaultAlignment;
93 struct AlignmentOfHelper<float>
98 static constexpr
size_t value = 64UL;
100 static constexpr
size_t value = 32UL;
102 static constexpr
size_t value = 16UL;
104 static constexpr
size_t value = std::alignment_of<float>::value;
118 struct AlignmentOfHelper<double>
123 static constexpr
size_t value = 64UL;
125 static constexpr
size_t value = 32UL;
127 static constexpr
size_t value = 16UL;
129 static constexpr
size_t value = std::alignment_of<double>::value;
143 struct AlignmentOfHelper< complex<float> >
148 static constexpr
size_t value = 64UL;
150 static constexpr
size_t value = 32UL;
152 static constexpr
size_t value = 16UL;
154 static constexpr
size_t value = std::alignment_of< complex<float> >::value;
168 struct AlignmentOfHelper< complex<double> >
173 static constexpr
size_t value = 64UL;
175 static constexpr
size_t value = 32UL;
177 static constexpr
size_t value = 16UL;
179 static constexpr
size_t value = std::alignment_of< complex<double> >::value;
206 template<
typename T >
217 template<
typename T >
229 template<
typename T >
230 struct AlignmentOf< volatile T > : IntegralConstant<size_t,AlignmentOfHelper<T>::value>
241 template<
typename T >
242 struct AlignmentOf< const volatile T > : IntegralConstant<size_t,AlignmentOfHelper<T>::value>
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the IsVectorizable type trait.
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:207