All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MultExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_MULTEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_MULTEXPRTRAIT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
92 #include <blaze/util/InvalidType.h>
93 #include <blaze/util/mpl/If.h>
94 #include <blaze/util/mpl/IfNot.h>
95 #include <blaze/util/SelectType.h>
102 
103 
104 namespace blaze {
105 
106 //=================================================================================================
107 //
108 // CLASS DEFINITION
109 //
110 //=================================================================================================
111 
112 //*************************************************************************************************
122 template< typename T1 // Type of the left-hand side multiplication operand
123  , typename T2 > // Type of the right-hand side multiplication operand
125 {
126  private:
127  //**struct Failure******************************************************************************
129  struct Failure { typedef INVALID_TYPE Type; };
131  //**********************************************************************************************
132 
133  //**********************************************************************************************
138  //**********************************************************************************************
139 
140  //**********************************************************************************************
142  typedef typename If< IsMatrix<T1>
143  , typename If< IsDenseMatrix<T1>
144  , typename If< IsRowMajorMatrix<T1>
145  , typename If< IsMatrix<T2>
146  , typename If< IsDenseMatrix<T2>
147  , typename If< IsRowMajorMatrix<T2>
150  >::Type
151  , typename If< IsRowMajorMatrix<T2>
154  >::Type
155  >::Type
156  , typename If< IsVector<T2>
157  , typename If< IsDenseVector<T2>
160  , Failure
161  >::Type
164  , Failure
165  >::Type
166  >::Type
167  , typename If< IsNumeric<T2>
169  , Failure
170  >::Type
171  >::Type
172  >::Type
173  , typename If< IsMatrix<T2>
174  , typename If< IsDenseMatrix<T2>
175  , typename If< IsRowMajorMatrix<T2>
178  >::Type
179  , typename If< IsRowMajorMatrix<T2>
182  >::Type
183  >::Type
184  , typename If< IsVector<T2>
185  , typename If< IsDenseVector<T2>
188  , Failure
189  >::Type
192  , Failure
193  >::Type
194  >::Type
195  , typename If< IsNumeric<T2>
197  , Failure
198  >::Type
199  >::Type
200  >::Type
201  >::Type
202  , typename If< IsRowMajorMatrix<T1>
203  , typename If< IsMatrix<T2>
204  , typename If< IsDenseMatrix<T2>
205  , typename If< IsRowMajorMatrix<T2>
208  >::Type
209  , typename If< IsRowMajorMatrix<T2>
212  >::Type
213  >::Type
214  , typename If< IsVector<T2>
215  , typename If< IsDenseVector<T2>
218  , Failure
219  >::Type
222  , Failure
223  >::Type
224  >::Type
225  , typename If< IsNumeric<T2>
227  , Failure
228  >::Type
229  >::Type
230  >::Type
231  , typename If< IsMatrix<T2>
232  , typename If< IsDenseMatrix<T2>
233  , typename If< IsRowMajorMatrix<T2>
236  >::Type
237  , typename If< IsRowMajorMatrix<T2>
240  >::Type
241  >::Type
242  , typename If< IsVector<T2>
243  , typename If< IsDenseVector<T2>
246  , Failure
247  >::Type
250  , Failure
251  >::Type
252  >::Type
253  , typename If< IsNumeric<T2>
255  , Failure
256  >::Type
257  >::Type
258  >::Type
259  >::Type
260  >::Type
261  , typename If< IsVector<T1>
262  , typename If< IsDenseVector<T1>
263  , typename If< IsTransposeVector<T1>
264  , typename If< IsMatrix<T2>
265  , typename If< IsDenseMatrix<T2>
266  , typename If< IsRowMajorMatrix<T2>
269  >::Type
270  , typename If< IsRowMajorMatrix<T2>
273  >::Type
274  >::Type
275  , typename If< IsVector<T2>
276  , typename If< IsDenseVector<T2>
277  , typename If< IsTransposeVector<T2>
280  >::Type
281  , typename If< IsTransposeVector<T2>
284  >::Type
285  >::Type
286  , typename If< IsNumeric<T2>
288  , Failure
289  >::Type
290  >::Type
291  >::Type
292  , typename If< IsVector<T2>
293  , typename If< IsDenseVector<T2>
294  , typename If< IsTransposeVector<T2>
297  >::Type
298  , typename If< IsTransposeVector<T2>
301  >::Type
302  >::Type
303  , typename If< IsNumeric<T2>
305  , Failure
306  >::Type
307  >::Type
308  >::Type
309  , typename If< IsTransposeVector<T1>
310  , typename If< IsMatrix<T2>
311  , typename If< IsDenseMatrix<T2>
312  , typename If< IsRowMajorMatrix<T2>
315  >::Type
316  , typename If< IsRowMajorMatrix<T2>
319  >::Type
320  >::Type
321  , typename If< IsVector<T2>
322  , typename If< IsDenseVector<T2>
323  , typename If< IsTransposeVector<T2>
326  >::Type
327  , typename If< IsTransposeVector<T2>
330  >::Type
331  >::Type
332  , typename If< IsNumeric<T2>
334  , Failure
335  >::Type
336  >::Type
337  >::Type
338  , typename If< IsVector<T2>
339  , typename If< IsDenseVector<T2>
340  , typename If< IsTransposeVector<T2>
343  >::Type
344  , typename If< IsTransposeVector<T2>
347  >::Type
348  >::Type
349  , typename If< IsNumeric<T2>
351  , Failure
352  >::Type
353  >::Type
354  >::Type
355  >::Type
356  , typename If< IsNumeric<T1>
357  , typename If< IsMatrix<T2>
358  , typename If< IsDenseMatrix<T2>
359  , typename If< IsRowMajorMatrix<T2>
362  >::Type
363  , typename If< IsRowMajorMatrix<T2>
366  >::Type
367  >::Type
368  , typename If< IsVector<T2>
369  , typename If< IsDenseVector<T2>
370  , typename If< IsTransposeVector<T2>
373  >::Type
374  , typename If< IsTransposeVector<T2>
377  >::Type
378  >::Type
379  , typename If< IsNumeric<T2>
381  , Failure
382  >::Type
383  >::Type
384  >::Type
385  , Failure
386  >::Type
387  >::Type
388  >::Type Tmp;
389 
390  typedef typename RemoveReference< typename RemoveCV<T1>::Type >::Type Type1;
391  typedef typename RemoveReference< typename RemoveCV<T2>::Type >::Type Type2;
393  //**********************************************************************************************
394 
395  public:
396  //**********************************************************************************************
398  typedef typename SelectType< qualified, MultExprTrait<Type1,Type2>, Tmp >::Type::Type Type;
400  //**********************************************************************************************
401 };
402 //*************************************************************************************************
403 
404 } // namespace blaze
405 
406 #endif