ColumnExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_COLUMNEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_COLUMNEXPRTRAIT_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
70 {
71  private:
72  //**struct Failure******************************************************************************
74  struct Failure { using Type = INVALID_TYPE; };
76  //**********************************************************************************************
77 
78  //**struct Result*******************************************************************************
80  struct Result { using Type = decltype( column( std::declval<MT>(), std::declval<size_t>() ) ); };
82  //**********************************************************************************************
83 
84  public:
85  //**********************************************************************************************
87  using Type = typename If_< IsMatrix< RemoveReference_<MT> >
88  , Result
89  , Failure >::Type;
91  //**********************************************************************************************
92 };
93 //*************************************************************************************************
94 
95 
96 //*************************************************************************************************
109 template< typename MT > // Type of the matrix operand
111 //*************************************************************************************************
112 
113 } // namespace blaze
114 
115 #endif
Column< MT > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:124
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.
typename ColumnExprTrait< MT >::Type ColumnExprTrait_
Auxiliary alias declaration for the ColumnExprTrait type trait.The ColumnExprTrait_ alias declaration...
Definition: ColumnExprTrait.h:110
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.
Evaluation of the expression type type of a column operation.Via this type trait it is possible to ev...
Definition: ColumnExprTrait.h:69