Blaze  3.6
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 
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 >
165 //*************************************************************************************************
166 
167 } // namespace blaze
168 
169 #endif
Header file for the IsSame and IsStrictlySame type traits.
Compile time check for uniform vectors and matrices.This type trait tests whether or not the given te...
Definition: IsUniform.h:105
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
constexpr bool IsExpression_v
Auxiliary variable template for the IsExpression type trait.The IsExpression_v variable template prov...
Definition: IsExpression.h:130
Header file for the EnableIf class template.
Header file for the IsZero type trait.
Header file for the IntegralConstant class template.
constexpr bool IsUniform_v
Auxiliary variable template for the IsUniform type trait.The IsUniform_v variable template provides a...
Definition: IsUniform.h:164
Header file for the IsExpression type trait class.