summaryrefslogtreecommitdiff
path: root/utests/runtime_event.cpp
diff options
context:
space:
mode:
authorJunyan He <junyan.he@intel.com>2016-09-21 17:47:23 +0800
committerYang Rong <rong.r.yang@intel.com>2016-09-28 15:59:55 +0800
commit6483fb4bf4cd0f9e4d29760c7bb1494cf02a84ce (patch)
treeca4bf2c68f5a7f81c79fc217bb95e4eb5f184408 /utests/runtime_event.cpp
parent87c6eb4f4a083e6d9ed69cd6b4160684205e6194 (diff)
downloadbeignet-6483fb4bf4cd0f9e4d29760c7bb1494cf02a84ce.tar.gz
Fix bugs in utest for event.
The block api should make sure all its wait list will become ready, or we will hang. Signed-off-by: Junyan He <junyan.he@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/runtime_event.cpp')
-rw-r--r--utests/runtime_event.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utests/runtime_event.cpp b/utests/runtime_event.cpp
index 00e02f1d..5804f955 100644
--- a/utests/runtime_event.cpp
+++ b/utests/runtime_event.cpp
@@ -18,7 +18,7 @@ void runtime_event(void)
OCL_CREATE_USER_EVENT(ev[0]);
- clEnqueueWriteBuffer(queue, buf[0], CL_TRUE, 0, BUFFERSIZE*sizeof(int), (void *)cpu_src, 1, &ev[0], &ev[1]);
+ clEnqueueWriteBuffer(queue, buf[0], CL_FALSE, 0, BUFFERSIZE*sizeof(int), (void *)cpu_src, 1, &ev[0], &ev[1]);
OCL_SET_ARG(0, sizeof(cl_mem), &buf[0]);
OCL_SET_ARG(1, sizeof(int), &value);
@@ -33,7 +33,7 @@ void runtime_event(void)
OCL_ASSERT(status >= CL_SUBMITTED);
}
- buf_data[0] = clEnqueueMapBuffer(queue, buf[0], CL_TRUE, 0, 0, BUFFERSIZE*sizeof(int), 1, &ev[2], NULL, NULL);
+ buf_data[0] = clEnqueueMapBuffer(queue, buf[0], CL_FALSE, 0, 0, BUFFERSIZE*sizeof(int), 1, &ev[2], NULL, NULL);
OCL_SET_USER_EVENT_STATUS(ev[0], CL_COMPLETE);