Blaze 3.9
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
45#include <blaze/util/EnableIf.h>
48
49
50namespace blaze {
51
52//=================================================================================================
53//
54// CLASS DEFINITION
55//
56//=================================================================================================
57
58//*************************************************************************************************
60template< typename T > struct IsUniform;
62//*************************************************************************************************
63
64
65//*************************************************************************************************
70template< typename T
71 , typename = void >
72struct IsUniformHelper
73 : public IsZero<T>
74{};
75
76template< typename T > // Type of the operand
77struct 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//*************************************************************************************************
104template< typename T >
106 : public IsUniformHelper<T>
107{};
108//*************************************************************************************************
109
110
111//*************************************************************************************************
116template< typename T >
117struct IsUniform< const T >
118 : public IsUniform<T>
119{};
121//*************************************************************************************************
122
123
124//*************************************************************************************************
129template< typename T >
130struct IsUniform< volatile T >
131 : public IsUniform<T>
132{};
134//*************************************************************************************************
135
136
137//*************************************************************************************************
142template< typename T >
143struct IsUniform< const volatile T >
144 : public IsUniform<T>
145{};
147//*************************************************************************************************
148
149
150//*************************************************************************************************
163template< typename T >
165//*************************************************************************************************
166
167} // namespace blaze
168
169#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 IsExpression_v
Auxiliary variable template for the IsExpression type trait.
Definition: IsExpression.h:114
constexpr bool IsUniform_v
Auxiliary variable template for the IsUniform type trait.
Definition: IsUniform.h:164
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.
Definition: EnableIf.h:138
Compile time check for uniform vectors and matrices.
Definition: IsUniform.h:107
Header file for the IsZero type trait.