All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ColumnExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TRAITS_COLUMNEXPRTRAIT_H_
23 #define _BLAZE_MATH_TRAITS_COLUMNEXPRTRAIT_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 DenseColumn<T,IsColumnMajorMatrix<T>::value> Type; };
78  //**********************************************************************************************
79 
80  //**struct SparseResult*************************************************************************
82  template< typename T >
83  struct SparseResult { typedef SparseColumn<T,IsColumnMajorMatrix<T>::value> Type; };
85  //**********************************************************************************************
86 
87  //**********************************************************************************************
89  typedef typename RemoveReference< typename RemoveCV<MT>::Type >::Type Tmp;
91  //**********************************************************************************************
92 
93  public:
94  //**********************************************************************************************
96  typedef typename If< IsExpression<MT>
98  , typename If< IsDenseMatrix<MT>
99  , DenseResult<MT>
100  , typename If< IsSparseMatrix<MT>
101  , SparseResult<MT>
102  , Failure
103  >::Type
104  >::Type
105  >::Type::Type Type;
107  //**********************************************************************************************
108 
109  private:
110  //**Compile time checks*************************************************************************
115  //**********************************************************************************************
116 };
117 //*************************************************************************************************
118 
119 } // namespace blaze
120 
121 #endif