Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
traits
DeclStrUppTrait.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_TRAITS_DECLSTRUPPTRAIT_H_
36
#define _BLAZE_MATH_TRAITS_DECLSTRUPPTRAIT_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <utility>
44
#include <
blaze/math/adaptors/strictlyuppermatrix/BaseTemplate.h
>
45
#include <
blaze/math/typetraits/IsMatrix.h
>
46
#include <
blaze/math/typetraits/Size.h
>
47
#include <
blaze/util/EnableIf.h
>
48
49
50
namespace
blaze {
51
52
//=================================================================================================
53
//
54
// CLASS DEFINITION
55
//
56
//=================================================================================================
57
58
//*************************************************************************************************
60
template
<
typename
>
struct
DeclStrUppTrait
;
61
template
<
typename
,
typename
=
void
>
struct
DeclStrUppTraitEval;
63
//*************************************************************************************************
64
65
66
//*************************************************************************************************
68
template
<
typename
T >
69
auto
evalDeclStrUppTrait(
const
volatile
T& ) -> DeclStrUppTraitEval<T>;
71
//*************************************************************************************************
72
73
74
//*************************************************************************************************
125
template
<
typename
MT >
// Type of the matrix
126
struct
DeclStrUppTrait
127
:
public
decltype( evalDeclStrUppTrait( std::declval<MT&>() ) )
128
{};
129
//*************************************************************************************************
130
131
132
//*************************************************************************************************
145
template
<
typename
MT >
// Type of the matrix
146
using
DeclStrUppTrait_t
=
typename
DeclStrUppTrait<MT>::Type
;
147
//*************************************************************************************************
148
149
150
//*************************************************************************************************
155
template
<
typename
MT
// Type of the matrix
156
,
typename
>
// Restricting condition
157
struct
DeclStrUppTraitEval
158
{};
160
//*************************************************************************************************
161
162
163
//*************************************************************************************************
168
template
<
typename
MT >
// Type of the matrix
169
struct
DeclStrUppTraitEval< MT
170
,
EnableIf_t
<
IsMatrix_v
<MT> &&
171
(
Size_v<MT,0UL>
==
DefaultSize_v
||
172
Size_v<MT,1UL>
==
DefaultSize_v
||
173
Size_v<MT,0UL>
==
Size_v<MT,1UL>
) > >
174
{
175
using
Type = StrictlyUpperMatrix<typename MT::ResultType>;
176
};
178
//*************************************************************************************************
179
180
}
// namespace blaze
181
182
#endif
EnableIf.h
Header file for the EnableIf class template.
IsMatrix.h
Header file for the IsMatrix type trait.
BaseTemplate.h
Header file for the implementation of the base template of the StrictlyUpperMatrix.
blaze::DeclStrUppTrait_t
typename DeclStrUppTrait< MT >::Type DeclStrUppTrait_t
Auxiliary alias declaration for the DeclStrUppTrait type trait.
Definition
DeclStrUppTrait.h:146
blaze::Size_v
constexpr ptrdiff_t Size_v
Auxiliary variable template for the Size type trait.
Definition
Size.h:176
blaze::DefaultSize_v
constexpr ptrdiff_t DefaultSize_v
Default size of the Size type trait.
Definition
Size.h:72
blaze::IsMatrix_v
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.
Definition
IsMatrix.h:124
blaze::EnableIf_t
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition
EnableIf.h:138
Size.h
Header file for the Size type trait.
blaze::DeclStrUppTrait
Base template for the DeclStrUppTrait class.
Definition
DeclStrUppTrait.h:128
Generated by
1.18.0