[Beignet] [PATCH 5/5] Utest: Fix a bug for double div.

junyan.he at inbox.com junyan.he at inbox.com
Tue Oct 27 03:36:18 PDT 2015


From: Junyan He <junyan.he at linux.intel.com>

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
 utests/compiler_double_div.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/utests/compiler_double_div.cpp b/utests/compiler_double_div.cpp
index db763e3..11578cf 100644
--- a/utests/compiler_double_div.cpp
+++ b/utests/compiler_double_div.cpp
@@ -23,12 +23,15 @@ void compiler_double_div(void)
   // Run random tests
   OCL_MAP_BUFFER(0);
   OCL_MAP_BUFFER(1);
+  OCL_MAP_BUFFER(2);
   for (int32_t i = 0; i < (int32_t) n; ++i) {
     cpu_src0[i] = ((double*)buf_data[0])[i] = ((double)(((i - 5)*1334) * 11105));
     cpu_src1[i] = ((double*)buf_data[1])[i] = 499.13542123d*(i + 132.43d + 142.32*i);
+    ((double*)buf_data[2])[i] = 0.0d;
   }
   OCL_UNMAP_BUFFER(0);
   OCL_UNMAP_BUFFER(1);
+  OCL_UNMAP_BUFFER(2);
 
   // Run the kernel on GPU
   OCL_NDRANGE(1);
-- 
1.9.1





More information about the Beignet mailing list