[Beignet] [PATCH] Fix a bug for runtime_barrier_list.cpp, local var not inited.

junyan.he at inbox.com junyan.he at inbox.com
Sun Aug 31 19:04:46 PDT 2014


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

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

diff --git a/utests/runtime_barrier_list.cpp b/utests/runtime_barrier_list.cpp
index 6987d5e..e176771 100644
--- a/utests/runtime_barrier_list.cpp
+++ b/utests/runtime_barrier_list.cpp
@@ -1,3 +1,4 @@
+#include <string.h>
 #include "utest_helper.hpp"
 
 #define BUFFERSIZE  32*1024
@@ -10,6 +11,8 @@ void runtime_barrier_list(void)
   cl_int status = 0;
   cl_int value = 34;
 
+  memset(ev, 0, sizeof(cl_event)*5);
+
   // Setup kernel and buffers
   OCL_CREATE_KERNEL("compiler_event");
   OCL_CREATE_BUFFER(buf[0], 0, BUFFERSIZE*sizeof(int), NULL);
-- 
1.7.9.5





More information about the Beignet mailing list