IsSIMDCombinable.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISSIMDCOMBINABLE_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISSIMDCOMBINABLE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
61 template< typename T1
62  , typename T2
63  , typename... Ts >
64 struct IsSIMDCombinableHelper
65 {
66  enum : bool { value = IsSIMDCombinableHelper<T1,T2>::value &&
67  IsSIMDCombinableHelper<T2,Ts...>::value };
68 };
70 //*************************************************************************************************
71 
72 
73 //*************************************************************************************************
75 template< typename T >
77 struct IsSIMDCombinableHelper<T,T>
78 {
79  enum : bool { value = IsNumeric<T>::value };
80 };
82 //*************************************************************************************************
83 
84 
85 //*************************************************************************************************
87 template< typename T1, typename T2 >
89 struct IsSIMDCombinableHelper<T1,T2>
90 {
91  enum : bool { value = IsNumeric<T1>::value && IsIntegral<T1>::value &&
92  IsNumeric<T2>::value && IsIntegral<T2>::value &&
93  sizeof(T1) == sizeof(T2) };
94 };
96 //*************************************************************************************************
97 
98 
99 //*************************************************************************************************
119 template< typename T1, typename T2, typename... Ts >
121  : public BoolConstant< IsSIMDCombinableHelper< T1, T2, Ts... >::value >
122 {};
123 //*************************************************************************************************
124 
125 } // namespace blaze
126 
127 #endif
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Header file for the IsIntegral type trait.
Compile time check for data types.This type trait tests whether or not the given types can be combine...
Definition: IsSIMDCombinable.h:120
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the IsNumeric type trait.
Header file for the IntegralConstant class template.