Blaze 3.9
Ceil.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_FUNCTORS_CEIL_H_
36#define _BLAZE_MATH_FUNCTORS_CEIL_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <utility>
67#include <blaze/system/Inline.h>
68
69
70namespace blaze {
71
72//=================================================================================================
73//
74// CLASS DEFINITION
75//
76//=================================================================================================
77
78//*************************************************************************************************
82struct Ceil
83{
84 //**********************************************************************************************
90 template< typename T >
91 BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( T&& a ) const
92 {
93 return ceil( std::forward<T>( a ) );
94 }
95 //**********************************************************************************************
96
97 //**********************************************************************************************
102 template< typename T >
103 static constexpr bool simdEnabled() { return HasSIMDCeil_v<T>; }
104 //**********************************************************************************************
105
106 //**********************************************************************************************
111 static constexpr bool paddingEnabled() { return true; }
112 //**********************************************************************************************
113
114 //**********************************************************************************************
120 template< typename T >
121 BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
122 {
124 return ceil( a );
125 }
126 //**********************************************************************************************
127};
128//*************************************************************************************************
129
130
131
132
133//=================================================================================================
134//
135// YIELDSUNIFORM SPECIALIZATIONS
136//
137//=================================================================================================
138
139//*************************************************************************************************
141template< typename T >
142struct YieldsUniform<Ceil,T>
143 : public IsUniform<T>
144{};
146//*************************************************************************************************
147
148
149
150
151//=================================================================================================
152//
153// YIELDSSYMMETRIC SPECIALIZATIONS
154//
155//=================================================================================================
156
157//*************************************************************************************************
159template< typename MT >
160struct YieldsSymmetric<Ceil,MT>
161 : public IsSymmetric<MT>
162{};
164//*************************************************************************************************
165
166
167
168
169//=================================================================================================
170//
171// YIELDSLOWER SPECIALIZATIONS
172//
173//=================================================================================================
174
175//*************************************************************************************************
177template< typename MT >
178struct YieldsLower<Ceil,MT>
179 : public IsLower<MT>
180{};
182//*************************************************************************************************
183
184
185
186
187//=================================================================================================
188//
189// YIELDSUNILOWER SPECIALIZATIONS
190//
191//=================================================================================================
192
193//*************************************************************************************************
195template< typename MT >
196struct YieldsUniLower<Ceil,MT>
197 : public IsUniLower<MT>
198{};
200//*************************************************************************************************
201
202
203
204
205//=================================================================================================
206//
207// YIELDSSTRICTLYLOWER SPECIALIZATIONS
208//
209//=================================================================================================
210
211//*************************************************************************************************
213template< typename MT >
214struct YieldsStrictlyLower<Ceil,MT>
215 : public IsStrictlyLower<MT>
216{};
218//*************************************************************************************************
219
220
221
222
223//=================================================================================================
224//
225// YIELDSUPPER SPECIALIZATIONS
226//
227//=================================================================================================
228
229//*************************************************************************************************
231template< typename MT >
232struct YieldsUpper<Ceil,MT>
233 : public IsUpper<MT>
234{};
236//*************************************************************************************************
237
238
239
240
241//=================================================================================================
242//
243// YIELDSUNIUPPER SPECIALIZATIONS
244//
245//=================================================================================================
246
247//*************************************************************************************************
249template< typename MT >
250struct YieldsUniUpper<Ceil,MT>
251 : public IsUniUpper<MT>
252{};
254//*************************************************************************************************
255
256
257
258
259//=================================================================================================
260//
261// YIELDSSTRICTLYUPPER SPECIALIZATIONS
262//
263//=================================================================================================
264
265//*************************************************************************************************
267template< typename MT >
268struct YieldsStrictlyUpper<Ceil,MT>
269 : public IsStrictlyUpper<MT>
270{};
272//*************************************************************************************************
273
274
275
276
277//=================================================================================================
278//
279// YIELDSZERO SPECIALIZATIONS
280//
281//=================================================================================================
282
283//*************************************************************************************************
285template< typename T >
286struct YieldsZero<Ceil,T>
287 : public IsZero<T>
288{};
290//*************************************************************************************************
291
292} // namespace blaze
293
294#endif
Header file for the HasSIMDCeil type trait.
Macro for CUDA compatibility.
Header file for the IsLower type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Header file for the IsUniLower type trait.
Header file for the IsUniUpper type trait.
Header file for the IsUniform type trait.
Header file for the IsUpper type trait.
Header file for the YieldsLower type trait.
Header file for the YieldsStrictlyLower type trait.
Header file for the YieldsStrictlyUpper type trait.
Header file for the YieldsSymmetric type trait.
Header file for the YieldsUniLower type trait.
Header file for the YieldsUniUpper type trait.
Header file for the YieldsUniform type trait.
Header file for the YieldsUpper type trait.
Header file for the YieldsZero type trait.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_SIMD_PACK(T)
Constraint on the data type.
Definition: SIMDPack.h:60
BLAZE_ALWAYS_INLINE const SIMDdouble ceil(const SIMDf64< T > &a) noexcept=delete
Computes the largest integer value not less than the given value for a vector of double precision flo...
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
Header file for the ceil shim.
Header file for the SIMD ceil functionality.
Generic wrapper for the ceil() function.
Definition: Ceil.h:83
BLAZE_ALWAYS_INLINE decltype(auto) load(const T &a) const
Returns the result of the ceil() function for the given SIMD vector.
Definition: Ceil.h:121
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Ceil.h:103
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Ceil.h:111
System settings for the inline keywords.
Header file for the IsZero type trait.