Pow3.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_FUNCTORS_POW3_H_
36 #define _BLAZE_MATH_FUNCTORS_POW3_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/math/shims/Pow3.h>
62 #include <blaze/system/Inline.h>
63 
64 
65 namespace blaze {
66 
67 //=================================================================================================
68 //
69 // CLASS DEFINITION
70 //
71 //=================================================================================================
72 
73 //*************************************************************************************************
77 struct Pow3
78 {
79  //**********************************************************************************************
82  explicit inline Pow3()
83  {}
84  //**********************************************************************************************
85 
86  //**********************************************************************************************
92  template< typename T >
93  BLAZE_ALWAYS_INLINE constexpr decltype(auto) operator()( const T& a ) const
94  {
95  return pow3( a );
96  }
97  //**********************************************************************************************
98 
99  //**********************************************************************************************
104  template< typename T >
105  static constexpr bool simdEnabled() { return HasSIMDMult_v<T,T>; }
106  //**********************************************************************************************
107 
108  //**********************************************************************************************
113  static constexpr bool paddingEnabled() { return true; }
114  //**********************************************************************************************
115 
116  //**********************************************************************************************
122  template< typename T >
123  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
124  {
126  return pow3( a );
127  }
128  //**********************************************************************************************
129 };
130 //*************************************************************************************************
131 
132 
133 
134 
135 //=================================================================================================
136 //
137 // YIELDSUNIFORM SPECIALIZATIONS
138 //
139 //=================================================================================================
140 
141 //*************************************************************************************************
143 template< typename T >
144 struct YieldsUniform<Pow3,T>
145  : public IsUniform<T>
146 {};
148 //*************************************************************************************************
149 
150 
151 
152 
153 //=================================================================================================
154 //
155 // YIELDSLOWER SPECIALIZATIONS
156 //
157 //=================================================================================================
158 
159 //*************************************************************************************************
161 template< typename MT >
162 struct YieldsLower<Pow3,MT>
163  : public IsLower<MT>
164 {};
166 //*************************************************************************************************
167 
168 
169 
170 
171 //=================================================================================================
172 //
173 // YIELDSUNILOWER SPECIALIZATIONS
174 //
175 //=================================================================================================
176 
177 //*************************************************************************************************
179 template< typename MT >
180 struct YieldsUniLower<Pow3,MT>
181  : public IsUniLower<MT>
182 {};
184 //*************************************************************************************************
185 
186 
187 
188 
189 //=================================================================================================
190 //
191 // YIELDSSTRICTLYLOWER SPECIALIZATIONS
192 //
193 //=================================================================================================
194 
195 //*************************************************************************************************
197 template< typename MT >
198 struct YieldsStrictlyLower<Pow3,MT>
199  : public IsStrictlyLower<MT>
200 {};
202 //*************************************************************************************************
203 
204 
205 
206 
207 //=================================================================================================
208 //
209 // YIELDSUPPER SPECIALIZATIONS
210 //
211 //=================================================================================================
212 
213 //*************************************************************************************************
215 template< typename MT >
216 struct YieldsUpper<Pow3,MT>
217  : public IsUpper<MT>
218 {};
220 //*************************************************************************************************
221 
222 
223 
224 
225 //=================================================================================================
226 //
227 // YIELDSUNIUPPER SPECIALIZATIONS
228 //
229 //=================================================================================================
230 
231 //*************************************************************************************************
233 template< typename MT >
234 struct YieldsUniUpper<Pow3,MT>
235  : public IsUniUpper<MT>
236 {};
238 //*************************************************************************************************
239 
240 
241 
242 
243 //=================================================================================================
244 //
245 // YIELDSSTRICTLYUPPER SPECIALIZATIONS
246 //
247 //=================================================================================================
248 
249 //*************************************************************************************************
251 template< typename MT >
252 struct YieldsStrictlyUpper<Pow3,MT>
253  : public IsStrictlyUpper<MT>
254 {};
256 //*************************************************************************************************
257 
258 
259 
260 
261 //=================================================================================================
262 //
263 // YIELDSZERO SPECIALIZATIONS
264 //
265 //=================================================================================================
266 
267 //*************************************************************************************************
269 template< typename T >
270 struct YieldsZero<Pow3,T>
271  : public IsZero<T>
272 {};
274 //*************************************************************************************************
275 
276 } // namespace blaze
277 
278 #endif
Header file for the IsUniUpper type trait.
Header file for the YieldsStrictlyLower type trait.
Header file for the YieldsZero type trait.
Pow3()
Default constructor of the Pow3 functor.
Definition: Pow3.h:82
Header file for the IsUniLower type trait.
#define BLAZE_CONSTRAINT_MUST_BE_SIMD_PACK(T)
Constraint on the data type.In case the given data type T is not a SIMD pack, a compilation error is ...
Definition: SIMDPack.h:60
Header file for the IsUniform type trait.
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the YieldsStrictlyUpper type trait.
Header file for the YieldsUniLower type trait.
Header file for the IsLower type trait.
decltype(auto) BLAZE_ALWAYS_INLINE load(const T &a) const
Returns the result of the pow3() function for the given SIMD vector.
Definition: Pow3.h:123
Constraint on the data type.
Header file for the pow3 shim.
Header file for the IsStrictlyLower type trait.
decltype(auto) pow3(const Proxy< PT, RT > &proxy)
Computing the cube value of the represented element.
Definition: Proxy.h:1405
Header file for the HasSIMDMult type trait.
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Pow3.h:105
Header file for the YieldsUniform type trait.
Header file for the YieldsUpper type trait.
Header file for the IsZero type trait.
Header file for the YieldsLower type trait.
Generic wrapper for the pow3() function.
Definition: Pow3.h:77
Header file for the IsUpper type trait.
Header file for the YieldsUniUpper type trait.
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Pow3.h:113
System settings for the inline keywords.