Blaze  3.6
HasSIMDAbs.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_HASSIMDABS_H_
36 #define _BLAZE_MATH_TYPETRAITS_HASSIMDABS_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/system/Compiler.h>
52 
53 
54 namespace blaze {
55 
56 //=================================================================================================
57 //
58 // CLASS DEFINITION
59 //
60 //=================================================================================================
61 
62 //*************************************************************************************************
67 template< typename T > // Type of the operand
68 using HasSIMDAbsHelper =
69  BoolConstant< ( ( IsNumeric_v<T> && IsIntegral_v<T> && IsSigned_v<T> ) &&
70  ( ( bool( BLAZE_SSSE3_MODE ) && sizeof(T) <= 4UL ) ||
71  ( bool( BLAZE_AVX2_MODE ) && sizeof(T) <= 4UL ) ||
72  ( bool( BLAZE_MIC_MODE ) && sizeof(T) >= 4UL ) ||
73  ( bool( BLAZE_AVX512BW_MODE ) && sizeof(T) <= 2UL ) ||
74  ( bool( BLAZE_AVX512F_MODE ) && sizeof(T) >= 4UL ) ) ) ||
75  ( IsFloat_v<T> &&
76  ( bool( BLAZE_SSE2_MODE ) ||
77  bool( BLAZE_AVX_MODE ) ||
78  bool( BLAZE_MIC_MODE ) ||
79  bool( BLAZE_AVX512F_MODE ) ) ) ||
80  ( IsDouble_v<T> &&
81  !( bool( BLAZE_GNU_COMPILER ) && ( bool( BLAZE_MIC_MODE ) || bool( BLAZE_AVX512F_MODE ) ) ) &&
82  ( bool( BLAZE_SSE2_MODE ) ||
83  bool( BLAZE_AVX_MODE ) ||
84  bool( BLAZE_MIC_MODE ) ||
85  bool( BLAZE_AVX512F_MODE ) ) ) >;
87 //*************************************************************************************************
88 
89 
90 //*************************************************************************************************
111 template< typename T > // Type of the operand
113  : public BoolConstant< HasSIMDAbsHelper< RemoveCVRef_t<T> >::value >
114 {};
115 //*************************************************************************************************
116 
117 
118 //*************************************************************************************************
131 template< typename T > // Type of the operand
133 //*************************************************************************************************
134 
135 } // namespace blaze
136 
137 #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:72
#define BLAZE_MIC_MODE
Compilation switch for the MIC mode.This compilation switch enables/disables the MIC mode....
Definition: Vectorization.h:299
#define BLAZE_AVX512BW_MODE
Compilation switch for the AVX512BW mode.This compilation switch enables/disables the AVX512BW mode....
Definition: Vectorization.h:264
Header file for the RemoveCVRef type trait.
Header file for the IsIntegral type trait.
#define BLAZE_AVX2_MODE
Compilation switch for the AVX2 mode.This compilation switch enables/disables the AVX2 mode....
Definition: Vectorization.h:228
Header file for the IsFloat type trait.
#define BLAZE_SSSE3_MODE
Compilation switch for the SSSE3 mode.This compilation switch enables/disables the SSSE3 mode....
Definition: Vectorization.h:177
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the IsDouble type trait.
constexpr bool HasSIMDAbs_v
Auxiliary variable template for the HasSIMDAbs type trait.The HasSIMDAbs_v variable template provides...
Definition: HasSIMDAbs.h:132
Compiler-specific system settings.
Availability of a SIMD absolute value operation for the given data type.Depending on the available in...
Definition: HasSIMDAbs.h:112
Header file for the IsNumeric type trait.
#define BLAZE_AVX_MODE
Compilation switch for the AVX mode.This compilation switch enables/disables the AVX mode....
Definition: Vectorization.h:211
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant alias template represents ...
Definition: IntegralConstant.h:110
Header file for the IsSigned type trait.
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