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>
43 
44 
45 namespace blaze {
46 
47 //=================================================================================================
48 //
49 // CLASS DEFINITION
50 //
51 //=================================================================================================
52 
53 //*************************************************************************************************
62 template< typename MT > // Type of the matrix operand
64 {
65  private:
66  //**struct Failure******************************************************************************
68  struct Failure { typedef INVALID_TYPE Type; };
70  //**********************************************************************************************
71 
72  //**struct DenseResult**************************************************************************
74  template< typename T >
75  struct DenseResult { typedef DenseRow<T,IsRowMajorMatrix<T>::value> Type; };
77  //**********************************************************************************************
78 
79  //**struct SparseResult*************************************************************************
81  template< typename T >
82  struct SparseResult { typedef SparseRow<T,IsRowMajorMatrix<T>::value> Type; };
84  //**********************************************************************************************
85 
86  //**********************************************************************************************
88  typedef typename RemoveReference< typename RemoveCV<MT>::Type >::Type Tmp;
90  //**********************************************************************************************
91 
92  public:
93  //**********************************************************************************************
95  typedef typename If< IsExpression<MT>
97  , typename If< IsDenseMatrix<MT>
98  , DenseResult<MT>
99  , typename If< IsSparseMatrix<MT>
100  , SparseResult<MT>
101  , Failure
102  >::Type
103  >::Type
104  >::Type::Type Type;
106  //**********************************************************************************************
107 
108  private:
109  //**Compile time checks*************************************************************************
114  //**********************************************************************************************
115 };
116 //*************************************************************************************************
117 
118 } // namespace blaze
119 
120 #endif