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

Change-Id: I1f568c8c0e2333af1fda4c313dc48ea0c5b6ab00
这个提交包含在:
Ben Sander 于 2017-04-11 01:16:28 +00:00 提交
1 父节点 29af40fa76
当前提交 8bd34535b4
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);
+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);