All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RowExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_ROWEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_ROWEXPRTRAIT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
35 #include <blaze/util/InvalidType.h>
36 #include <blaze/util/mpl/If.h>
44 
45 
46 namespace blaze {
47 
48 //=================================================================================================
49 //
50 // CLASS DEFINITION
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
63 template< typename MT > // Type of the matrix operand
65 {
66  private:
67  //**struct Failure******************************************************************************
69  struct Failure { typedef INVALID_TYPE Type; };
71  //**********************************************************************************************
72 
73  //**struct DenseResult**************************************************************************
75  template< typename T >
76  struct DenseResult { typedef DenseRow<T,IsRowMajorMatrix<T>::value> Type; };
78  //**********************************************************************************************
79 
80  //**struct SparseResult*************************************************************************
82  template< typename T >
83  struct SparseResult { typedef SparseRow<T,IsRowMajorMatrix<T>::value> Type; };
85  //**********************************************************************************************
86 
87  //**********************************************************************************************
89  typedef typename RemoveReference< typename RemoveCV<MT>::Type >::Type Type1;
90  typedef typename RemoveReference< typename RemoveVolatile<MT>::Type >::Type Type2;
92  //**********************************************************************************************
93 
94  public:
95  //**********************************************************************************************
97  typedef typename If< IsExpression<MT>
99  , typename If< IsDenseMatrix<MT>
100  , DenseResult<MT>
101  , typename If< IsSparseMatrix<MT>
102  , SparseResult<MT>
103  , Failure
104  >::Type
105  >::Type
106  >::Type::Type Type;
108  //**********************************************************************************************
109 
110  private:
111  //**Compile time checks*************************************************************************
116  //**********************************************************************************************
117 };
118 //*************************************************************************************************
119 
120 } // namespace blaze
121 
122 #endif