Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
traits
SubvectorTrait.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_TRAITS_SUBVECTORTRAIT_H_
36
#define _BLAZE_MATH_TRAITS_SUBVECTORTRAIT_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
SubvectorTrait
;
59
template
<
typename
,
size_t
,
size_t
,
typename
=
void
>
struct
SubvectorTraitEval1;
60
template
<
typename
,
size_t
,
size_t
,
typename
=
void
>
struct
SubvectorTraitEval2;
62
//*************************************************************************************************
63
64
65
//*************************************************************************************************
67
template
<
size_t
I,
size_t
N,
typename
T >
68
auto
evalSubvectorTrait(
const
volatile
T& ) -> SubvectorTraitEval1<T,I,N>;
69
70
template
<
typename
T >
71
auto
evalSubvectorTrait(
const
volatile
T& ) -> SubvectorTraitEval1<T,inf,inf>;
73
//*************************************************************************************************
74
75
76
//*************************************************************************************************
122
template
<
typename
VT
// Type of the vector
123
,
size_t
... CSAs >
// Compile time subvector arguments
124
struct
SubvectorTrait
125
:
public
decltype( evalSubvectorTrait<CSAs...>( std::declval<VT&>() ) )
126
{};
127
//*************************************************************************************************
128
129
130
//*************************************************************************************************
143
template
<
typename
VT
// Type of the vector
144
,
size_t
... CSAs >
// Compile time subvector arguments
145
using
SubvectorTrait_t
=
typename
SubvectorTrait
<VT,CSAs...>
::Type
;
146
//*************************************************************************************************
147
148
149
//*************************************************************************************************
154
template
<
typename
VT
// Type of the vector
155
,
size_t
I
// Index of the first element
156
,
size_t
N
// Number of elements
157
,
typename
>
// Restricting condition
158
struct
SubvectorTraitEval1
159
:
public
SubvectorTraitEval2<VT,I,N>
160
{};
162
//*************************************************************************************************
163
164
165
//*************************************************************************************************
170
template
<
typename
VT
// Type of the vector
171
,
size_t
I
// Index of the first element
172
,
size_t
N
// Number of elements
173
,
typename
>
// Restricting condition
174
struct
SubvectorTraitEval2
175
{};
177
//*************************************************************************************************
178
179
}
// namespace blaze
180
181
#endif
Infinity.h
Numerical infinity for built-in data types.
blaze::Type
blaze::SubvectorTrait_t
typename SubvectorTrait< VT, CSAs... >::Type SubvectorTrait_t
Auxiliary alias declaration for the SubvectorTrait type trait.
Definition
SubvectorTrait.h:145
blaze::SubvectorTrait
Base template for the SubvectorTrait class.
Definition
SubvectorTrait.h:126
Types.h
Header file for basic type definitions.
Generated by
1.18.0