HasSIMDHypot.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_HASSIMDHYPOT_H_
36 #define _BLAZE_MATH_TYPETRAITS_HASSIMDHYPOT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/util/EnableIf.h>
46 #include <blaze/util/mpl/Or.h>
50 
51 
52 namespace blaze {
53 
54 //=================================================================================================
55 //
56 // CLASS DEFINITION
57 //
58 //=================================================================================================
59 
60 //*************************************************************************************************
62 template< typename T1 // Type of the left-hand side operand
63  , typename T2 // Type of the right-hand side operand
64  , typename = void > // Restricting condition
65 struct HasSIMDHypotHelper
66 {
67  enum : bool { value = false };
68 };
70 //*************************************************************************************************
71 
72 
73 //*************************************************************************************************
75 #if BLAZE_SVML_MODE
76 template< typename T >
77 struct HasSIMDHypotHelper< T, T, EnableIf_< Or< IsFloat<T>, IsDouble<T> > > >
78 {
79  enum : bool { value = bool( BLAZE_SSE_MODE ) ||
80  bool( BLAZE_AVX_MODE ) ||
81  bool( BLAZE_MIC_MODE ) ||
82  bool( BLAZE_AVX512F_MODE ) };
83 };
84 #endif
85 
86 //*************************************************************************************************
87 
88 
89 //*************************************************************************************************
110 template< typename T1 // Type of the left-hand side operand
111  , typename T2 > // Type of the right-hand side operand
113  : public BoolConstant< HasSIMDHypotHelper< Decay_<T1>, Decay_<T2> >::value >
114 {};
115 //*************************************************************************************************
116 
117 } // namespace blaze
118 
119 #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
Availability of a SIMD hypotenous operation for the given data types.Depending on the available instr...
Definition: HasSIMDHypot.h:112
Header file for the IsFloat type trait.
Header file for the Decay type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the IsDouble type trait.
Header file for the Or class template.
#define BLAZE_SSE_MODE
Compilation switch for the SSE mode.This compilation switch enables/disables the SSE mode...
Definition: Vectorization.h:126
Header file for the EnableIf class template.
#define BLAZE_AVX_MODE
Compilation switch for the AVX mode.This compilation switch enables/disables the AVX mode...
Definition: Vectorization.h:211
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.