HasSIMDAtanh.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_HASSIMDATANH_H_
36 #define _BLAZE_MATH_TYPETRAITS_HASSIMDATANH_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 T // Type of the operand
63  , typename = void > // Restricting condition
64 struct HasSIMDAtanhHelper
65 {
66  enum : bool { value = false };
67 };
69 //*************************************************************************************************
70 
71 
72 //*************************************************************************************************
74 #if BLAZE_SVML_MODE
75 template< typename T >
76 struct HasSIMDAtanhHelper< T, EnableIf_< Or< IsFloat<T>, IsDouble<T> > > >
77 {
78  enum : bool { value = bool( BLAZE_SSE_MODE ) ||
79  bool( BLAZE_AVX_MODE ) ||
80  bool( BLAZE_MIC_MODE ) };
81 };
82 #endif
83 
84 //*************************************************************************************************
85 
86 
87 //*************************************************************************************************
108 template< typename T > // Type of the operand
109 struct HasSIMDAtanh : public BoolConstant< HasSIMDAtanhHelper< Decay_<T> >::value >
110 {};
111 //*************************************************************************************************
112 
113 } // namespace blaze
114 
115 #endif
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:248
Header file for the IsFloat type trait.
Header file for the Decay type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the IsDouble type trait.
Availability of a SIMD inverse hyperbolic tangent operation for the given data type.Depending on the available instruction set (SSE, SSE2, SSE3, SSE4, AVX, AVX2, MIC, ...) and the used compiler, this type trait provides the information whether a SIMD inverse hyperbolic tangent operation exists for the given data type T (ignoring the cv-qualifiers). In case the SIMD operation is available, the value member constant is set to true, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to false, Type is FalseType, and the class derives from FalseType. The following example assumes that the Intel SVML is available:
Definition: HasSIMDAtanh.h:109
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:129
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:214
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
Header file for the IntegralConstant class template.
System settings for the SSE mode.