HasSIMDRound.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_HASSIMDROUND_H_
36 #define _BLAZE_MATH_TYPETRAITS_HASSIMDROUND_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/util/EnableIf.h>
46 #include <blaze/util/mpl/Or.h>
48 
49 
50 namespace blaze {
51 
52 //=================================================================================================
53 //
54 // CLASS DEFINITION
55 //
56 //=================================================================================================
57 
58 //*************************************************************************************************
60 template< typename T // Type of the operand
61  , typename = void > // Restricting condition
62 struct HasSIMDRoundHelper
63 {
64  enum : bool { value = false };
65 };
67 //*************************************************************************************************
68 
69 
70 //*************************************************************************************************
72 template< typename T >
73 struct HasSIMDRoundHelper< T, EnableIf_< IsFloat<T> > >
74 {
75  enum : bool { value = bool( BLAZE_SSE4_MODE ) ||
76  bool( BLAZE_AVX_MODE ) ||
77  bool( BLAZE_MIC_MODE ) ||
78  bool( BLAZE_AVX512F_MODE ) };
79 };
80 
81 template< typename T >
82 struct HasSIMDRoundHelper< T, EnableIf_< IsDouble<T> > >
83 {
84  enum : bool { value = bool( BLAZE_SSE4_MODE ) ||
85  bool( BLAZE_AVX_MODE ) ||
86  bool( BLAZE_AVX512F_MODE ) };
87 };
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
113 template< typename T > // Type of the operand
115  : public BoolConstant< HasSIMDRoundHelper< Decay_<T> >::value >
116 {};
117 //*************************************************************************************************
118 
119 } // namespace blaze
120 
121 #endif
#define BLAZE_AVX512F_MODE
Compilation switch for the AVX512F mode.This compilation switch enables/disables the AVX512F mode...
Definition: Vectorization.h:246
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
#define BLAZE_MIC_MODE
Compilation switch for the MIC mode.This compilation switch enables/disables the MIC mode...
Definition: Vectorization.h:299
Header file for the Decay type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the Or class template.
Header file for the EnableIf class template.
#define BLAZE_SSE4_MODE
Compilation switch for the SSE4 mode.This compilation switch enables/disables the SSE4 mode...
Definition: Vectorization.h:194
#define BLAZE_AVX_MODE
Compilation switch for the AVX mode.This compilation switch enables/disables the AVX mode...
Definition: Vectorization.h:211
Availability of a SIMD round operation for the given data type.Depending on the available instruction...
Definition: HasSIMDRound.h:114
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
Header file for the IntegralConstant class template.
System settings for the SSE mode.