[Beignet] [PATCH] utests: fix test case builtin_tgamma.
Ruiling Song
ruiling.song at intel.com
Wed Apr 22 21:28:39 PDT 2015
Should use tgamma instead of tgammaf when generating reference.
And the ulp bound is <= 16ulp
Signed-off-by: Ruiling Song <ruiling.song at intel.com>
---
utests/builtin_tgamma.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/utests/builtin_tgamma.cpp b/utests/builtin_tgamma.cpp
index 47cc5f4..dbcb60e 100644
--- a/utests/builtin_tgamma.cpp
+++ b/utests/builtin_tgamma.cpp
@@ -32,11 +32,11 @@ void builtin_tgamma(void)
OCL_MAP_BUFFER(1);
float *dst = (float*)buf_data[1];
for (int i = 0; i < n; ++i) {
- float cpu = tgammaf(src[i]);
+ float cpu = tgamma(src[i]);
if (isinf(cpu)) {
OCL_ASSERT(isinf(dst[i]));
- } else if (fabsf(cpu - dst[i]) >= cl_FLT_ULP(cpu) * ULPSIZE_FACTOR) {
- printf("%f %f %f\n", src[i], cpu, dst[i]);
+ } else if (fabsf(cpu - dst[i]) > cl_FLT_ULP(cpu) * ULPSIZE_FACTOR) {
+ printf("%f %a %a\n", src[i], cpu, dst[i]);
OCL_ASSERT(0);
}
}
--
2.3.6
More information about the Beignet
mailing list