Add integer abs (initial implementation, can be optimized with OCML)

Change-Id: I1f568c8c0e2333af1fda4c313dc48ea0c5b6ab00
이 커밋은 다음에 포함됨:
Ben Sander
2017-04-11 01:16:28 +00:00
부모 29af40fa76
커밋 8bd34535b4
2개의 변경된 파일과 5개의 추가작업 그리고 0개의 파일을 삭제
+1
파일 보기
@@ -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);
+4
파일 보기
@@ -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);