All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsColumnMajorMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TYPETRAITS_ISCOLUMNMAJORMATRIX_H_
23 #define _BLAZE_MATH_TYPETRAITS_ISCOLUMNMAJORMATRIX_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <boost/type_traits/is_base_of.hpp>
31 #include <boost/type_traits/remove_cv.hpp>
32 #include <blaze/util/FalseType.h>
33 #include <blaze/util/SelectType.h>
34 #include <blaze/util/TrueType.h>
35 
36 
37 namespace blaze {
38 
39 //=================================================================================================
40 //
41 // ::blaze NAMESPACE FORWARD DECLARATIONS
42 //
43 //=================================================================================================
44 
45 template< typename, bool > struct DenseMatrix;
46 template< typename, bool > struct SparseMatrix;
47 
48 
49 
50 
51 //=================================================================================================
52 //
53 // CLASS DEFINITION
54 //
55 //=================================================================================================
56 
57 //*************************************************************************************************
62 template< typename T >
63 struct IsColumnMajorMatrixHelper
64 {
65  private:
66  //**********************************************************************************************
67  typedef typename boost::remove_cv<T>::type T2;
68  //**********************************************************************************************
69 
70  public:
71  //**********************************************************************************************
72  enum { value = boost::is_base_of< DenseMatrix <T2,true>, T2 >::value ||
73  boost::is_base_of< SparseMatrix<T2,true>, T2 >::value };
74  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
75  //**********************************************************************************************
76 };
78 //*************************************************************************************************
79 
80 
81 //*************************************************************************************************
100 template< typename T >
101 struct IsColumnMajorMatrix : public IsColumnMajorMatrixHelper<T>::Type
102 {
103  public:
104  //**********************************************************************************************
106  enum { value = IsColumnMajorMatrixHelper<T>::value };
107  typedef typename IsColumnMajorMatrixHelper<T>::Type Type;
109  //**********************************************************************************************
110 };
111 //*************************************************************************************************
112 
113 } // namespace blaze
114 
115 #endif