Blaze 3.9
HasSIMDSign.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_TYPETRAITS_HASSIMDSIGN_H_
36#define _BLAZE_MATH_TYPETRAITS_HASSIMDSIGN_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
52
53
54namespace blaze {
55
56//=================================================================================================
57//
58// CLASS DEFINITION
59//
60//=================================================================================================
61
62//*************************************************************************************************
67template< typename T > // Type of the operand
68using HasSIMDSignHelper =
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_AVX512BW_MODE ) && sizeof(T) <= 2UL ) ||
73 ( bool( BLAZE_AVX512F_MODE ) && sizeof(T) >= 4UL ) ) ) ||
74 ( ( IsFloat_v<T> || IsDouble_v<T> ) &&
75 !( bool( BLAZE_GNU_COMPILER ) && ( bool( BLAZE_MIC_MODE ) || bool( BLAZE_AVX512F_MODE ) ) ) &&
76 ( bool( BLAZE_SSE4_MODE ) ||
77 bool( BLAZE_AVX_MODE ) ||
78 bool( BLAZE_MIC_MODE ) ||
79 bool( BLAZE_AVX512F_MODE ) ) ) >;
81//*************************************************************************************************
82
83
84//*************************************************************************************************
105template< typename T > // Type of the operand
107 : public BoolConstant< HasSIMDSignHelper< RemoveCVRef_t<T> >::value >
108{};
109//*************************************************************************************************
110
111
112//*************************************************************************************************
125template< typename T > // Type of the operand
127//*************************************************************************************************
128
129} // namespace blaze
130
131#endif
Compiler-specific system settings.
Header file for the IntegralConstant class template.
Header file for the IsDouble type trait.
Header file for the IsFloat type trait.
Header file for the IsIntegral type trait.
Header file for the IsNumeric type trait.
Header file for the IsSigned type trait.
Header file for the RemoveCVRef type trait.
constexpr bool HasSIMDSign_v
Auxiliary variable template for the HasSIMDSign type trait.
Definition: HasSIMDSign.h:126
#define BLAZE_AVX_MODE
Compilation switch for the AVX mode.
Definition: Vectorization.h:211
#define BLAZE_AVX512F_MODE
Compilation switch for the AVX512F mode.
Definition: Vectorization.h:246
#define BLAZE_SSE4_MODE
Compilation switch for the SSE4 mode.
Definition: Vectorization.h:194
#define BLAZE_AVX512BW_MODE
Compilation switch for the AVX512BW mode.
Definition: Vectorization.h:264
#define BLAZE_AVX2_MODE
Compilation switch for the AVX2 mode.
Definition: Vectorization.h:228
#define BLAZE_MIC_MODE
Compilation switch for the MIC mode.
Definition: Vectorization.h:299
#define BLAZE_SSSE3_MODE
Compilation switch for the SSSE3 mode.
Definition: Vectorization.h:177
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition: IntegralConstant.h:110
Availability of a SIMD sign operation for the given data type.
Definition: HasSIMDSign.h:108
Generic wrapper for a compile time constant integral value.
Definition: IntegralConstant.h:74
System settings for the SSE mode.