Merge pull request #472 from Jorghi12/patch-3

Adding double/long int signatures for abs

[ROCm/hip commit: 57fb96013c]
此提交包含在:
Maneesh Gupta authored and GitHub committed 2018-05-30 08:32:14 +05:30
2 父節點 4751d72fdf c46563addc
當前提交 b60b8591ac
1 file changed
+9
+9
查看文件
@@ -59,6 +59,15 @@ __device__ int abs(int x) {
__device__ long long abs(long long x) {
return x >= 0 ? x : -x;
}
__device__ double abs(double x) {
return x >= 0 ? x : -x;
}
__device__ long int abs(long int x) {
return x >= 0 ? x : -x;
}
__device__ long long int labs(long long int x) {
return x >= 0 ? x : -x;
}
__device__ float fabsf(float x) { return hc::precise_math::fabsf(x); }
__device__ float fdimf(float x, float y) { return hc::precise_math::fdimf(x, y); }
__device__ float fdividef(float x, float y) { return x / y; }