Blaze  3.6
ColumnsTrait.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_TRAITS_COLUMNSTRAIT_H_
36 #define _BLAZE_MATH_TRAITS_COLUMNSTRAIT_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <utility>
44 #include <blaze/util/InvalidType.h>
45 #include <blaze/util/Types.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
58 template< typename, size_t > struct ColumnsTrait;
59 template< typename, size_t, typename = void > struct ColumnsTraitEval1;
60 template< typename, size_t, typename = void > struct ColumnsTraitEval2;
62 //*************************************************************************************************
63 
64 
65 //*************************************************************************************************
67 template< size_t N, typename T >
68 auto evalColumnsTrait( T& )
69  -> typename ColumnsTraitEval1<T,N>::Type;
70 
71 template< size_t N, typename T >
72 auto evalColumnsTrait( const T& )
73  -> typename ColumnsTrait<T,N>::Type;
74 
75 template< size_t N, typename T >
76 auto evalColumnsTrait( const volatile T& )
77  -> typename ColumnsTrait<T,N>::Type;
79 //*************************************************************************************************
80 
81 
82 //*************************************************************************************************
128 template< typename MT // Type of the matrix
129  , size_t N > // Number of compile time indices
131 {
132  public:
133  //**********************************************************************************************
135  using Type = decltype( evalColumnsTrait<N>( std::declval<MT&>() ) );
137  //**********************************************************************************************
138 };
139 //*************************************************************************************************
140 
141 
142 //*************************************************************************************************
155 template< typename MT // Type of the matrix
156  , size_t N > // Number of compile time indices
158 //*************************************************************************************************
159 
160 
161 //*************************************************************************************************
166 template< typename MT // Type of the matrix
167  , size_t N // Number of compile time indices
168  , typename > // Restricting condition
169 struct ColumnsTraitEval1
170 {
171  public:
172  //**********************************************************************************************
173  using Type = typename ColumnsTraitEval2<MT,N>::Type;
174  //**********************************************************************************************
175 };
177 //*************************************************************************************************
178 
179 
180 //*************************************************************************************************
185 template< typename MT // Type of the matrix
186  , size_t N // Number of compile time indices
187  , typename > // Restricting condition
188 struct ColumnsTraitEval2
189 {
190  public:
191  //**********************************************************************************************
192  using Type = INVALID_TYPE;
193  //**********************************************************************************************
194 };
196 //*************************************************************************************************
197 
198 } // namespace blaze
199 
200 #endif
Header file for basic type definitions.
typename ColumnsTrait< MT, N >::Type ColumnsTrait_t
Auxiliary alias declaration for the ColumnsTrait type trait.The ColumnsTrait_t alias declaration prov...
Definition: ColumnsTrait.h:157
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Utility type for generic codes.
Base template for the ColumnsTrait class.
Definition: ColumnsTrait.h:130