HasSIMDSqrt.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_HASSIMDSQRT_H_
36 #define _BLAZE_MATH_TYPETRAITS_HASSIMDSQRT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
58 template< typename T // Type of the operand
59  , typename = void > // Restricting condition
60 struct HasSIMDSqrtHelper
61 {
62  enum : bool { value = false };
63 };
65 //*************************************************************************************************
66 
67 
68 //*************************************************************************************************
70 template<>
71 struct HasSIMDSqrtHelper< float >
72 {
73  enum : bool { value = bool( BLAZE_SSE_MODE ) ||
74  bool( BLAZE_AVX_MODE ) ||
75  bool( BLAZE_MIC_MODE ) ||
76  bool( BLAZE_AVX512F_MODE ) };
77 };
79 //*************************************************************************************************
80 
81 
82 //*************************************************************************************************
84 template<>
85 struct HasSIMDSqrtHelper< double >
86 {
87  enum : bool { value = bool( BLAZE_SSE2_MODE ) ||
88  bool( BLAZE_AVX_MODE ) ||
89  bool( BLAZE_MIC_MODE ) ||
90  bool( BLAZE_AVX512F_MODE ) };
91 };
93 //*************************************************************************************************
94 
95 
96 //*************************************************************************************************
117 template< typename T > // Type of the operand
119  : public BoolConstant< HasSIMDSqrtHelper< Decay_<T> >::value >
120 {};
121 //*************************************************************************************************
122 
123 } // namespace blaze
124 
125 #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.
Availability of a SIMD square root operation for the given data type.Depending on the available instr...
Definition: HasSIMDSqrt.h:118
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_SSE_MODE
Compilation switch for the SSE mode.This compilation switch enables/disables the SSE mode...
Definition: Vectorization.h:126
#define BLAZE_AVX_MODE
Compilation switch for the AVX mode.This compilation switch enables/disables the AVX mode...
Definition: Vectorization.h:211
Header file for the IntegralConstant class template.
System settings for the SSE mode.
#define BLAZE_SSE2_MODE
Compilation switch for the SSE2 mode.This compilation switch enables/disables the SSE2 mode...
Definition: Vectorization.h:143