@@ -175,11 +175,21 @@ GEN_FUNC_OF_THREE_ARG(mad, double, double, double, double)
175
175
// genfloatf exp (genfloatf x)
176
176
GEN_FUNC_OF_ONE_ARG (native_exp, float , float )
177
177
178
- // genfloatf fabs (genfloatf x)
178
+ // genfloat fabs (genfloatf x)
179
179
GEN_FUNC_OF_ONE_ARG (fabs, float , float )
180
180
GEN_FUNC_OF_ONE_ARG (fabs, double , double )
181
181
// GEN_FUNC_OF_ONE_ARG(fabs, half, half)
182
182
183
+ // genfloat floor (genfloat x)
184
+ GEN_FUNC_OF_ONE_ARG (floor, float , float )
185
+ GEN_FUNC_OF_ONE_ARG (floor, double , double )
186
+ // GEN_FUNC_OF_ONE_ARG(floor, half, half)
187
+
188
+ // genfloat ceil (genfloat x)
189
+ GEN_FUNC_OF_ONE_ARG (ceil, float , float )
190
+ GEN_FUNC_OF_ONE_ARG (ceil, double , double )
191
+ // GEN_FUNC_OF_ONE_ARG(ceil, half, half)
192
+
183
193
/* --------------- 4.13.4 Integer functions. Device version -----------------*/
184
194
// geninteger max (geninteger x, geninteger y)
185
195
GEN_FUNC_OF_TWO_ARG (max, char , char , char )
@@ -293,6 +303,12 @@ template <typename T> T sqrt(T x) {
293
303
template <typename T> T fabs (T x) {
294
304
return __sycl_std::fabs (x);
295
305
}
306
+ template <typename T> T floor (T x) {
307
+ return __sycl_std::floor (x);
308
+ }
309
+ template <typename T> T ceil (T x) {
310
+ return __sycl_std::ceil (x);
311
+ }
296
312
namespace native {
297
313
template <typename T> T exp (T x) {
298
314
#ifdef __SYCL_DEVICE_ONLY__
0 commit comments