BandExprTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_BANDEXPRTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_BANDEXPRTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <utility>
46 #include <blaze/util/InvalidType.h>
47 #include <blaze/util/mpl/If.h>
48 #include <blaze/util/Types.h>
50 
51 
52 namespace blaze {
53 
54 //=================================================================================================
55 //
56 // CLASS DEFINITION
57 //
58 //=================================================================================================
59 
60 //*************************************************************************************************
69 template< typename MT // Type of the matrix operand
70  , ptrdiff_t... CBAs > // Compile time band arguments
72 {
73  private:
74  //**********************************************************************************************
76  struct Failure { using Type = INVALID_TYPE; };
78  //**********************************************************************************************
79 
80  //**********************************************************************************************
82  struct CompileTime { using Type = decltype( band<CBAs...>( std::declval<MT>() ) ); };
84  //**********************************************************************************************
85 
86  //**********************************************************************************************
88  struct Runtime { using Type = decltype( band( std::declval<MT>(), std::declval<ptrdiff_t>() ) ); };
90  //**********************************************************************************************
91 
92  public:
93  //**********************************************************************************************
95  using Type = typename If_< IsMatrix< RemoveReference_<MT> >
96  , IfTrue_< ( sizeof...( CBAs ) > 0UL )
97  , CompileTime
98  , Runtime >
99  , Failure >::Type;
101  //**********************************************************************************************
102 };
103 //*************************************************************************************************
104 
105 
106 //*************************************************************************************************
119 template< typename MT // Type of the matrix operand
120  , ptrdiff_t... CBAs > // Compile time band arguments
121 using BandExprTrait_ = typename BandExprTrait<MT,CBAs...>::Type;
122 //*************************************************************************************************
123 
124 
125 //*************************************************************************************************
134 template< typename MT > // Type of the matrix operand
136 //*************************************************************************************************
137 
138 
139 //*************************************************************************************************
152 template< typename MT > // Type of the matrix operand
154 //*************************************************************************************************
155 
156 } // namespace blaze
157 
158 #endif
Pointer difference type of the Blaze library.
Header file for basic type definitions.
typename DiagonalExprTrait< MT >::Type DiagonalExprTrait_
Auxiliary alias declaration for the DiagonalExprTrait type trait.The DiagonalExprTrait_ alias declara...
Definition: BandExprTrait.h:153
typename BandExprTrait< MT, CBAs... >::Type BandExprTrait_
Auxiliary alias declaration for the BandExprTrait type trait.The BandExprTrait_ alias declaration pro...
Definition: BandExprTrait.h:121
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
Header file for the IsMatrix type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
decltype(auto) band(Matrix< MT, SO > &matrix, RBAs... args)
Creating a view on a specific band of the given matrix.
Definition: Band.h:134
Evaluation of the expression type type of a band operation.Via this type trait it is possible to eval...
Definition: BandExprTrait.h:71
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.