Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
typetraits
IsUniform.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_TYPETRAITS_ISUNIFORM_H_
36
#define _BLAZE_MATH_TYPETRAITS_ISUNIFORM_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/math/typetraits/IsExpression.h
>
44
#include <
blaze/math/typetraits/IsZero.h
>
45
#include <
blaze/util/EnableIf.h
>
46
#include <
blaze/util/IntegralConstant.h
>
47
#include <
blaze/util/typetraits/IsSame.h
>
48
49
50
namespace
blaze {
51
52
//=================================================================================================
53
//
54
// CLASS DEFINITION
55
//
56
//=================================================================================================
57
58
//*************************************************************************************************
60
template
<
typename
T >
struct
IsUniform
;
62
//*************************************************************************************************
63
64
65
//*************************************************************************************************
70
template
<
typename
T
71
,
typename
=
void
>
72
struct
IsUniformHelper
73
:
public
IsZero
<T>
74
{};
75
76
template
<
typename
T >
// Type of the operand
77
struct
IsUniformHelper< T,
EnableIf_t
<
IsExpression_v
<T> && !
IsSame_v<T,typename T::ResultType>
> >
78
:
public
IsUniform< typename T::ResultType >::Type
79
{};
81
//*************************************************************************************************
82
83
84
//*************************************************************************************************
104
template
<
typename
T >
105
struct
IsUniform
106
:
public
IsUniformHelper<T>
107
{};
108
//*************************************************************************************************
109
110
111
//*************************************************************************************************
116
template
<
typename
T >
117
struct
IsUniform
< const T >
118
:
public
IsUniform
<T>
119
{};
121
//*************************************************************************************************
122
123
124
//*************************************************************************************************
129
template
<
typename
T >
130
struct
IsUniform< volatile T >
131
:
public
IsUniform<T>
132
{};
134
//*************************************************************************************************
135
136
137
//*************************************************************************************************
142
template
<
typename
T >
143
struct
IsUniform
< const volatile T >
144
:
public
IsUniform
<T>
145
{};
147
//*************************************************************************************************
148
149
150
//*************************************************************************************************
163
template
<
typename
T >
164
constexpr
bool
IsUniform_v
=
IsUniform<T>::value
;
165
//*************************************************************************************************
166
167
}
// namespace blaze
168
169
#endif
EnableIf.h
Header file for the EnableIf class template.
IntegralConstant.h
Header file for the IntegralConstant class template.
IsExpression.h
Header file for the IsExpression type trait class.
IsSame.h
Header file for the IsSame and IsStrictlySame type traits.
blaze::IsExpression_v
constexpr bool IsExpression_v
Auxiliary variable template for the IsExpression type trait.
Definition
IsExpression.h:114
blaze::IsUniform_v
constexpr bool IsUniform_v
Auxiliary variable template for the IsUniform type trait.
Definition
IsUniform.h:164
blaze::IsSame_v
constexpr bool IsSame_v
Auxiliary variable template for the IsSame type trait.
Definition
IsSame.h:159
blaze::EnableIf_t
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition
EnableIf.h:138
blaze::IsUniform
Compile time check for uniform vectors and matrices.
Definition
IsUniform.h:107
blaze::IsZero
Compile time check for zero vectors or matrices.
Definition
IsZero.h:109
IsZero.h
Header file for the IsZero type trait.
Generated by
1.18.0