Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
traits
DeclSymTrait.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_TRAITS_DECLSYMTRAIT_H_
36
#define _BLAZE_MATH_TRAITS_DECLSYMTRAIT_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <utility>
44
#include <
blaze/math/adaptors/symmetricmatrix/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
DeclSymTrait
;
61
template
<
typename
,
typename
=
void
>
struct
DeclSymTraitEval;
63
//*************************************************************************************************
64
65
66
//*************************************************************************************************
68
template
<
typename
T >
69
auto
evalDeclSymTrait(
const
volatile
T& ) -> DeclSymTraitEval<T>;
71
//*************************************************************************************************
72
73
74
//*************************************************************************************************
123
template
<
typename
MT >
// Type of the matrix
124
struct
DeclSymTrait
125
:
public
decltype( evalDeclSymTrait( std::declval<MT&>() ) )
126
{};
127
//*************************************************************************************************
128
129
130
//*************************************************************************************************
143
template
<
typename
MT >
// Type of the matrix
144
using
DeclSymTrait_t
=
typename
DeclSymTrait<MT>::Type
;
145
//*************************************************************************************************
146
147
148
//*************************************************************************************************
153
template
<
typename
MT
// Type of the matrix
154
,
typename
>
// Restricting condition
155
struct
DeclSymTraitEval
156
{};
158
//*************************************************************************************************
159
160
161
//*************************************************************************************************
166
template
<
typename
MT >
// Type of the matrix
167
struct
DeclSymTraitEval< MT
168
,
EnableIf_t
<
IsMatrix_v
<MT> &&
169
(
Size_v<MT,0UL>
==
DefaultSize_v
||
170
Size_v<MT,1UL>
==
DefaultSize_v
||
171
Size_v<MT,0UL>
==
Size_v<MT,1UL>
) > >
172
{
173
using
Type = SymmetricMatrix<typename MT::ResultType>;
174
};
176
//*************************************************************************************************
177
178
}
// namespace blaze
179
180
#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 SymmetricMatrix.
blaze::DeclSymTrait_t
typename DeclSymTrait< MT >::Type DeclSymTrait_t
Auxiliary alias declaration for the DeclSymTrait type trait.
Definition
DeclSymTrait.h:144
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::DeclSymTrait
Base template for the DeclSymTrait class.
Definition
DeclSymTrait.h:126
Generated by
1.18.0