All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IsRowMajorMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_TYPETRAITS_ISROWMAJORMATRIX_H_
23 #define _BLAZE_MATH_TYPETRAITS_ISROWMAJORMATRIX_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <boost/type_traits/is_base_of.hpp>
33 #include <blaze/util/FalseType.h>
34 #include <blaze/util/SelectType.h>
35 #include <blaze/util/TrueType.h>
37 
38 
39 namespace blaze {
40 
41 //=================================================================================================
42 //
43 // CLASS DEFINITION
44 //
45 //=================================================================================================
46 
47 //*************************************************************************************************
52 template< typename T >
53 struct IsRowMajorMatrixHelper
54 {
55  private:
56  //**********************************************************************************************
57  typedef typename RemoveCV<T>::Type T2;
58  //**********************************************************************************************
59 
60  public:
61  //**********************************************************************************************
62  enum { value = boost::is_base_of< DenseMatrix <T2,false>, T2 >::value ||
63  boost::is_base_of< SparseMatrix<T2,false>, T2 >::value };
64  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
65  //**********************************************************************************************
66 };
68 //*************************************************************************************************
69 
70 
71 //*************************************************************************************************
90 template< typename T >
91 struct IsRowMajorMatrix : public IsRowMajorMatrixHelper<T>::Type
92 {
93  public:
94  //**********************************************************************************************
96  enum { value = IsRowMajorMatrixHelper<T>::value };
97  typedef typename IsRowMajorMatrixHelper<T>::Type Type;
99  //**********************************************************************************************
100 };
101 //*************************************************************************************************
102 
103 } // namespace blaze
104 
105 #endif