Blaze  3.6
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 
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
61 template< typename T >
62 struct IsColumnMajorMatrixHelper
63 {
64  private:
65  //**********************************************************************************************
66  static T* create();
67 
68  template< typename MT >
69  static TrueType test( const Matrix<MT,columnMajor>* );
70 
71  template< typename MT >
72  static TrueType test( const volatile Matrix<MT,columnMajor>* );
73 
74  static FalseType test( ... );
75  //**********************************************************************************************
76 
77  public:
78  //**********************************************************************************************
79  using Type = decltype( test( create() ) );
80  //**********************************************************************************************
81 };
83 //*************************************************************************************************
84 
85 
86 //*************************************************************************************************
111 template< typename T >
113  : public IsColumnMajorMatrixHelper<T>::Type
114 {};
115 //*************************************************************************************************
116 
117 
118 //*************************************************************************************************
123 template< typename T >
124 struct IsColumnMajorMatrix<T&>
125  : public FalseType
126 {};
128 //*************************************************************************************************
129 
130 
131 //*************************************************************************************************
144 template< typename T >
146 //*************************************************************************************************
147 
148 } // namespace blaze
149 
150 #endif
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: IntegralConstant.h:121
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:72
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
Header file for the matrix storage order types.
constexpr bool IsColumnMajorMatrix_v
Auxiliary variable template for the IsColumnMajorMatrix type trait.The IsColumnMajorMatrix_v variable...
Definition: IsColumnMajorMatrix.h:145
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time check for column-major matrix types.This type trait tests whether or not the given templ...
Definition: IsColumnMajorMatrix.h:112
Header file for all forward declarations for expression class templates.
Header file for the IntegralConstant class template.