diff options
author | Yang Rong <rong.r.yang@intel.com> | 2013-08-23 11:04:22 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-08-30 16:32:23 +0800 |
commit | 287a250f1925b0d84e7585c2707ea2409c15fb1b (patch) | |
tree | a733cd3990dadb8419cb36117c6615d5f8cbaa99 /utests/runtime_event.cpp | |
parent | 0237652c579123436e5f48514f733e36c8b5264a (diff) | |
download | beignet-287a250f1925b0d84e7585c2707ea2409c15fb1b.tar.gz |
Change event test case to cover clEnqueueMapBuffer.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests/runtime_event.cpp')
-rw-r--r-- | utests/runtime_event.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/utests/runtime_event.cpp b/utests/runtime_event.cpp index 1ec8692a..b974f6a6 100644 --- a/utests/runtime_event.cpp +++ b/utests/runtime_event.cpp @@ -33,6 +33,8 @@ 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); + OCL_SET_USER_EVENT_STATUS(ev[0], CL_COMPLETE); clGetEventInfo(ev[0], CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof(status), &status, NULL); @@ -45,13 +47,10 @@ void runtime_event(void) OCL_ASSERT(status <= CL_COMPLETE); } - // Check results - OCL_MAP_BUFFER(0); - for (uint32_t i = 0; i < n; ++i) { OCL_ASSERT(((int*)buf_data[0])[i] == (int)value + 0x3); } - OCL_UNMAP_BUFFER(0); + clEnqueueUnmapMemObject(queue, buf[0], buf_data[0], 0, NULL, NULL); for (cl_uint i = 0; i != sizeof(ev) / sizeof(cl_event); ++i) { clReleaseEvent(ev[i]); |