Blaze 3.9
SubmatrixTrait.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_TRAITS_SUBMATRIXTRAIT_H_
36#define _BLAZE_MATH_TRAITS_SUBMATRIXTRAIT_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
44#include <blaze/math/Infinity.h>
45#include <blaze/util/Types.h>
46
47
48namespace blaze {
49
50//=================================================================================================
51//
52// CLASS DEFINITION
53//
54//=================================================================================================
55
56//*************************************************************************************************
58template< typename, size_t... > struct SubmatrixTrait;
59template< typename, size_t, size_t, size_t, size_t, typename = void > struct SubmatrixTraitEval1;
60template< typename, size_t, size_t, size_t, size_t, typename = void > struct SubmatrixTraitEval2;
62//*************************************************************************************************
63
64
65//*************************************************************************************************
67template< size_t I, size_t J, size_t M, size_t N, typename T >
68auto evalSubmatrixTrait( const volatile T& ) -> SubmatrixTraitEval1<T,I,J,M,N>;
69
70template< typename T >
71auto evalSubmatrixTrait( const volatile T& ) -> SubmatrixTraitEval1<T,inf,inf,inf,inf>;
73//*************************************************************************************************
74
75
76//*************************************************************************************************
122template< typename MT // Type of the matrix
123 , size_t... CSAs > // Compile time submatrix arguments
125 : public decltype( evalSubmatrixTrait<CSAs...>( std::declval<MT&>() ) )
126{};
127//*************************************************************************************************
128
129
130//*************************************************************************************************
143template< typename MT // Type of the matrix
144 , size_t... CSAs > // Compile time submatrix arguments
145using SubmatrixTrait_t = typename SubmatrixTrait<MT,CSAs...>::Type;
146//*************************************************************************************************
147
148
149//*************************************************************************************************
154template< typename MT // Type of the matrix
155 , size_t I // Index of the first row
156 , size_t J // Index of the first column
157 , size_t M // Number of rows
158 , size_t N // Number of columns
159 , typename > // Restricting condition
160struct SubmatrixTraitEval1
161 : public SubmatrixTraitEval2<MT,I,J,M,N>
162{};
164//*************************************************************************************************
165
166
167//*************************************************************************************************
172template< typename MT // Type of the matrix
173 , size_t I // Index of the first row
174 , size_t J // Index of the first column
175 , size_t M // Number of rows
176 , size_t N // Number of columns
177 , typename > // Restricting condition
178struct SubmatrixTraitEval2
179{};
181//*************************************************************************************************
182
183} // namespace blaze
184
185#endif
Numerical infinity for built-in data types.
typename SubmatrixTrait< MT, CSAs... >::Type SubmatrixTrait_t
Auxiliary alias declaration for the SubmatrixTrait type trait.
Definition: SubmatrixTrait.h:145
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:126
Header file for basic type definitions.