Skip to content

Commit dd2161a

Browse files
committed
[SYCL] Add missing abs
1 parent cb6a8dc commit dd2161a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sycl/include/sycl/stl_wrappers/cmath-fallback.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
__DPCPP_SYCL_DEVICE long long abs(long long n) { return n < 0 ? -n : n; }
3030
__DPCPP_SYCL_DEVICE_C long long llabs(long long n) { return n < 0 ? -n : n; }
3131
__DPCPP_SYCL_DEVICE long abs(long n) { return n < 0 ? -n : n; }
32+
__DPCPP_SYCL_DEVICE int abs(int n) { return n < 0 ? -n : n; }
3233
__DPCPP_SYCL_DEVICE_C long labs(long n) { return n < 0 ? -n : n; }
3334
__DPCPP_SYCL_DEVICE float abs(float x) { return x < 0 ? -x : x; }
3435
__DPCPP_SYCL_DEVICE double abs(double x) { return x < 0 ? -x : x; }

0 commit comments

Comments
 (0)