Add integer abs (initial implementation, can be optimized with OCML)
Change-Id: I1f568c8c0e2333af1fda4c313dc48ea0c5b6ab00
[ROCm/clr commit: 8bd34535b4]
Этот коммит содержится в:
@@ -51,6 +51,7 @@ __device__ float exp10f(float x);
|
||||
__device__ float exp2f(float x);
|
||||
__device__ float expf(float x);
|
||||
__device__ float expm1f(float x);
|
||||
__device__ int abs(int x);
|
||||
__device__ float fabsf(float x);
|
||||
__device__ float fdimf(float x, float y);
|
||||
__device__ float fdividef(float x, float y);
|
||||
|
||||
@@ -114,6 +114,10 @@ __device__ float expm1f(float x)
|
||||
{
|
||||
return hc::precise_math::expm1f(x);
|
||||
}
|
||||
__device__ int abs(int x)
|
||||
{
|
||||
return x >= 0 ? x : -x; // TODO - optimize with OCML
|
||||
}
|
||||
__device__ float fabsf(float x)
|
||||
{
|
||||
return hc::precise_math::fabsf(x);
|
||||
|
||||
Ссылка в новой задаче
Block a user