Blaze 3.9
IsSymmetric.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_TYPETRAITS_ISSYMMETRIC_H_
36#define _BLAZE_MATH_TYPETRAITS_ISSYMMETRIC_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
44#include <blaze/util/EnableIf.h>
47
48
49namespace blaze {
50
51//=================================================================================================
52//
53// CLASS DEFINITION
54//
55//=================================================================================================
56
57//*************************************************************************************************
59template< typename T > struct IsSymmetric;
61//*************************************************************************************************
62
63
64//*************************************************************************************************
69template< typename T
70 , typename = void >
71struct IsSymmetricHelper
72 : public FalseType
73{};
74
75template< typename T > // Type of the operand
76struct IsSymmetricHelper< T, EnableIf_t< IsExpression_v<T> && !IsSame_v<T,typename T::ResultType> > >
77 : public IsSymmetric< typename T::ResultType >::Type
78{};
80//*************************************************************************************************
81
82
83//*************************************************************************************************
112template< typename T >
114 : public IsSymmetricHelper<T>
115{};
116//*************************************************************************************************
117
118
119//*************************************************************************************************
124template< typename T >
125struct IsSymmetric< const T >
126 : public IsSymmetric<T>
127{};
129//*************************************************************************************************
130
131
132//*************************************************************************************************
137template< typename T >
138struct IsSymmetric< volatile T >
139 : public IsSymmetric<T>
140{};
142//*************************************************************************************************
143
144
145//*************************************************************************************************
150template< typename T >
151struct IsSymmetric< const volatile T >
152 : public IsSymmetric<T>
153{};
155//*************************************************************************************************
156
157
158//*************************************************************************************************
171template< typename T >
173//*************************************************************************************************
174
175} // namespace blaze
176
177#endif
Header file for the EnableIf class template.
Header file for the IntegralConstant class template.
Header file for the IsExpression type trait class.
Header file for the IsSame and IsStrictlySame type traits.
constexpr bool IsSymmetric_v
Auxiliary variable template for the IsSymmetric type trait.
Definition: IsSymmetric.h:172
constexpr bool IsExpression_v
Auxiliary variable template for the IsExpression type trait.
Definition: IsExpression.h:114
BoolConstant< false > FalseType
Type/value traits base class.
Definition: IntegralConstant.h:121
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
Compile time check for symmetric matrices.
Definition: IsSymmetric.h:115