SubmatrixExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_SUBMATRIXEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_SUBMATRIXEXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <utility>
46 #include <blaze/util/InvalidType.h>
47 #include <blaze/util/mpl/If.h>
49 
50 
51 namespace blaze {
52 
53 //=================================================================================================
54 //
55 // CLASS DEFINITION
56 //
57 //=================================================================================================
58 
59 //*************************************************************************************************
68 template< typename MT // Type of the matrix operand
69  , bool AF > // Alignment flag
71 {
72  private:
73  //**struct Failure******************************************************************************
75  struct Failure { using Type = INVALID_TYPE; };
77  //**********************************************************************************************
78 
79  //**struct Result*******************************************************************************
81  struct Result { using Type = decltype( submatrix<AF>( std::declval<MT>()
82  , std::declval<size_t>()
83  , std::declval<size_t>()
84  , std::declval<size_t>()
85  , std::declval<size_t>() ) ); };
87  //**********************************************************************************************
88 
89  public:
90  //**********************************************************************************************
92  using Type = typename If_< IsMatrix< RemoveReference_<MT> >
93  , Result
94  , Failure >::Type;
96  //**********************************************************************************************
97 };
98 //*************************************************************************************************
99 
100 
101 //*************************************************************************************************
114 template< typename MT // Type of the matrix operand
115  , bool AF > // Alignment flag
117 //*************************************************************************************************
118 
119 } // namespace blaze
120 
121 #endif
typename SubmatrixExprTrait< MT, AF >::Type SubmatrixExprTrait_
Auxiliary alias declaration for the SubmatrixExprTrait type trait.The SubmatrixExprTrait_ alias decla...
Definition: SubmatrixExprTrait.h:116
Header file for the IsMatrix type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Evaluation of the expression type type of a submatrix operation.Via this type trait it is possible to...
Definition: SubmatrixExprTrait.h:70
Header file for all forward declarations for views.
Utility type for generic codes.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:154
Header file for the RemoveReference type trait.