All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AddExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_ADDEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_ADDEXPRTRAIT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
60 #include <blaze/util/InvalidType.h>
61 #include <blaze/util/mpl/If.h>
68 
69 
70 namespace blaze {
71 
72 //=================================================================================================
73 //
74 // CLASS DEFINITION
75 //
76 //=================================================================================================
77 
78 //*************************************************************************************************
88 template< typename T1 // Type of the left-hand side addition operand
89  , typename T2 > // Type of the right-hand side addition operand
91 {
92  private:
93  //**struct Failure******************************************************************************
95  struct Failure { typedef INVALID_TYPE Type; };
97  //**********************************************************************************************
98 
99  //**********************************************************************************************
104  //**********************************************************************************************
105 
106  //**********************************************************************************************
108  typedef typename If< IsMatrix<T1>
109  , typename If< IsMatrix<T2>
110  , typename If< IsDenseMatrix<T1>
111  , typename If< IsDenseMatrix<T2>
112  , typename If< IsRowMajorMatrix<T1>
113  , typename If< IsRowMajorMatrix<T2>
116  >::Type
117  , typename If< IsRowMajorMatrix<T2>
120  >::Type
121  >::Type
122  , typename If< IsRowMajorMatrix<T1>
123  , typename If< IsRowMajorMatrix<T2>
126  >::Type
127  , typename If< IsRowMajorMatrix<T2>
130  >::Type
131  >::Type
132  >::Type
133  , typename If< IsDenseMatrix<T2>
134  , typename If< IsRowMajorMatrix<T1>
135  , typename If< IsRowMajorMatrix<T2>
138  >::Type
139  , typename If< IsRowMajorMatrix<T2>
142  >::Type
143  >::Type
144  , typename If< IsRowMajorMatrix<T1>
145  , typename If< IsRowMajorMatrix<T2>
148  >::Type
149  , typename If< IsRowMajorMatrix<T2>
152  >::Type
153  >::Type
154  >::Type
155  >::Type
156  , Failure
157  >::Type
158  , typename If< IsVector<T1>
159  , typename If< IsVector<T2>
160  , typename If< IsDenseVector<T1>
161  , typename If< IsDenseVector<T2>
162  , typename If< IsTransposeVector<T1>
163  , typename If< IsTransposeVector<T2>
165  , Failure
166  >::Type
167  , typename If< IsTransposeVector<T2>
168  , Failure
170  >::Type
171  >::Type
172  , typename If< IsTransposeVector<T1>
173  , typename If< IsTransposeVector<T2>
175  , Failure
176  >::Type
177  , typename If< IsTransposeVector<T2>
178  , Failure
180  >::Type
181  >::Type
182  >::Type
183  , typename If< IsDenseVector<T2>
184  , typename If< IsTransposeVector<T1>
185  , typename If< IsTransposeVector<T2>
187  , Failure
188  >::Type
189  , typename If< IsTransposeVector<T2>
190  , Failure
192  >::Type
193  >::Type
194  , typename If< IsTransposeVector<T1>
195  , typename If< IsTransposeVector<T2>
197  , Failure
198  >::Type
199  , typename If< IsTransposeVector<T2>
200  , Failure
202  >::Type
203  >::Type
204  >::Type
205  >::Type
206  , Failure
207  >::Type
208  , typename If< IsNumeric<T1>
209  , typename If< IsNumeric<T2>
211  , Failure
212  >::Type
213  , Failure
214  >::Type
215  >::Type
216  >::Type Tmp;
217 
218  typedef typename RemoveReference< typename RemoveCV<T1>::Type >::Type Type1;
219  typedef typename RemoveReference< typename RemoveCV<T2>::Type >::Type Type2;
221  //**********************************************************************************************
222 
223  public:
224  //**********************************************************************************************
226  typedef typename SelectType< qualified, AddExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
228  //**********************************************************************************************
229 };
230 //*************************************************************************************************
231 
232 } // namespace blaze
233 
234 #endif