IsColumnMajorMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TYPETRAITS_ISCOLUMNMAJORMATRIX_H_
36 #define _BLAZE_MATH_TYPETRAITS_ISCOLUMNMAJORMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <boost/type_traits/is_base_of.hpp>
46 #include <blaze/util/FalseType.h>
47 #include <blaze/util/SelectType.h>
48 #include <blaze/util/TrueType.h>
50 
51 
52 namespace blaze {
53 
54 //=================================================================================================
55 //
56 // CLASS DEFINITION
57 //
58 //=================================================================================================
59 
60 //*************************************************************************************************
65 template< typename T >
66 struct IsColumnMajorMatrixHelper
67 {
68  private:
69  //**********************************************************************************************
70  typedef typename RemoveCV<T>::Type T2;
71  //**********************************************************************************************
72 
73  public:
74  //**********************************************************************************************
75  enum { value = boost::is_base_of< DenseMatrix <T2,true>, T2 >::value ||
76  boost::is_base_of< SparseMatrix<T2,true>, T2 >::value };
77  typedef typename SelectType<value,TrueType,FalseType>::Type Type;
78  //**********************************************************************************************
79 };
81 //*************************************************************************************************
82 
83 
84 //*************************************************************************************************
109 template< typename T >
110 struct IsColumnMajorMatrix : public IsColumnMajorMatrixHelper<T>::Type
111 {
112  public:
113  //**********************************************************************************************
115  enum { value = IsColumnMajorMatrixHelper<T>::value };
116  typedef typename IsColumnMajorMatrixHelper<T>::Type Type;
118  //**********************************************************************************************
119 };
120 //*************************************************************************************************
121 
122 } // namespace blaze
123 
124 #endif
Header file for the FalseType type/value trait base class.
Header file for the RemoveCV type trait.
Header file for the SparseMatrix base class.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the DenseMatrix base class.
Header file for the SelectType class template.
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:110
Header file for the TrueType type/value trait base class.