utest: write to dst buffer to fix utest failure

Submitted by Luo, Xionghu on Nov. 23, 2015, 1:42 p.m.

Details

Message ID 1448286138-18621-1-git-send-email-xionghu.luo@intel.com
State New
Headers show
Series "utest: write to dst buffer to fix utest failure" ( rev: 1 ) in Beignet

Not browsing as part of any series.

Commit Message

Luo, Xionghu Nov. 23, 2015, 1:42 p.m.
From: Ruiling Song <ruiling.song@intel.com>

the utest will check on this.

Signed-off-by: Ruiling Song <ruiling.song@intel.com>
---
 kernels/compiler_double_div.cl | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/kernels/compiler_double_div.cl b/kernels/compiler_double_div.cl
index 4eada2d..3022f51 100644
--- a/kernels/compiler_double_div.cl
+++ b/kernels/compiler_double_div.cl
@@ -3,6 +3,8 @@  kernel void compiler_double_div(global double *src1, global double *src2, global
   int i = get_global_id(0);
   if (i % 3 != 0)
     dst[i] = src1[i] / src2[i];
+  else
+    dst[i] = 0.0;
 }
 
 kernel void compiler_double_div_uniform(double src1, double src2, double tmp, global double *dst) {