AreSIMDCombinable.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ARESIMDCOMBINABLE_H_
36 #define _BLAZE_MATH_TYPETRAITS_ARESIMDCOMBINABLE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
47 
48 
49 namespace blaze {
50 
51 //=================================================================================================
52 //
53 // CLASS DEFINITION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
62 template< typename T1
63  , typename T2
64  , typename... Args >
65 struct AreSIMDCombinableHelper
66 {
67  enum : bool { value = AreSIMDCombinableHelper<T1,T2>::value &&
68  AreSIMDCombinableHelper<T2,Args...>::value };
69 };
71 //*************************************************************************************************
72 
73 
74 //*************************************************************************************************
76 template< typename T >
78 struct AreSIMDCombinableHelper<T,T>
79 {
80  enum : bool { value = IsNumeric<T>::value };
81 };
83 //*************************************************************************************************
84 
85 
86 //*************************************************************************************************
88 template< typename T1, typename T2 >
90 struct AreSIMDCombinableHelper<T1,T2>
91 {
92  enum : bool { value = IsNumeric<T1>::value && IsIntegral<T1>::value &&
93  IsNumeric<T2>::value && IsIntegral<T2>::value &&
94  sizeof(T1) == sizeof(T2) };
95 };
97 //*************************************************************************************************
98 
99 
100 //*************************************************************************************************
120 template< typename T1, typename T2, typename... Args >
122  : public BoolConstant< AreSIMDCombinableHelper< T1, T2, Decay_<Args>... >::value >
123 {};
124 //*************************************************************************************************
125 
126 } // namespace blaze
127 
128 #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: AreSIMDCombinable.h:121
Header file for the Decay type trait.
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.