Add integer abs (initial implementation, can be optimized with OCML)
Change-Id: I1f568c8c0e2333af1fda4c313dc48ea0c5b6ab00
[ROCm/hip commit: 22f3b91cad]
이 커밋은 다음에 포함됨:
1 부모
1175fe9b5a
커밋
b716a7781e
2 파일이 변경됨
+5
검색과 일치하는 파일 없음
@@ -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);
|
||||
|
||||
새 이슈에서 참조
사용자 차단