Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
traits
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
48
namespace
blaze {
49
50
//=================================================================================================
51
//
52
// CLASS DEFINITION
53
//
54
//=================================================================================================
55
56
//*************************************************************************************************
58
template
<
typename
,
size_t
... >
struct
SubmatrixTrait
;
59
template
<
typename
,
size_t
,
size_t
,
size_t
,
size_t
,
typename
=
void
>
struct
SubmatrixTraitEval1;
60
template
<
typename
,
size_t
,
size_t
,
size_t
,
size_t
,
typename
=
void
>
struct
SubmatrixTraitEval2;
62
//*************************************************************************************************
63
64
65
//*************************************************************************************************
67
template
<
size_t
I,
size_t
J,
size_t
M,
size_t
N,
typename
T >
68
auto
evalSubmatrixTrait(
const
volatile
T& ) -> SubmatrixTraitEval1<T,I,J,M,N>;
69
70
template
<
typename
T >
71
auto
evalSubmatrixTrait(
const
volatile
T& ) -> SubmatrixTraitEval1<T,inf,inf,inf,inf>;
73
//*************************************************************************************************
74
75
76
//*************************************************************************************************
122
template
<
typename
MT
// Type of the matrix
123
,
size_t
... CSAs >
// Compile time submatrix arguments
124
struct
SubmatrixTrait
125
:
public
decltype( evalSubmatrixTrait<CSAs...>( std::declval<MT&>() ) )
126
{};
127
//*************************************************************************************************
128
129
130
//*************************************************************************************************
143
template
<
typename
MT
// Type of the matrix
144
,
size_t
... CSAs >
// Compile time submatrix arguments
145
using
SubmatrixTrait_t
=
typename
SubmatrixTrait
<MT,CSAs...>
::Type
;
146
//*************************************************************************************************
147
148
149
//*************************************************************************************************
154
template
<
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
160
struct
SubmatrixTraitEval1
161
:
public
SubmatrixTraitEval2<MT,I,J,M,N>
162
{};
164
//*************************************************************************************************
165
166
167
//*************************************************************************************************
172
template
<
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
178
struct
SubmatrixTraitEval2
179
{};
181
//*************************************************************************************************
182
183
}
// namespace blaze
184
185
#endif
Infinity.h
Numerical infinity for built-in data types.
blaze::Type
blaze::SubmatrixTrait_t
typename SubmatrixTrait< MT, CSAs... >::Type SubmatrixTrait_t
Auxiliary alias declaration for the SubmatrixTrait type trait.
Definition
SubmatrixTrait.h:145
blaze::SubmatrixTrait
Base template for the SubmatrixTrait class.
Definition
SubmatrixTrait.h:126
Types.h
Header file for basic type definitions.
Generated by
1.18.0