diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-02 10:34:33 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-02 12:42:51 +0800 |
commit | 8e1c54f415af9d7c09bd240dbdf4a49cbb5b2727 (patch) | |
tree | b3b56be362d9c129134f781280c27d87980c1ca8 /utests/runtime_event.cpp | |
parent | 5b60b8c98afb1fb0da9aee8284edeb05623182b6 (diff) | |
download | beignet-8e1c54f415af9d7c09bd240dbdf4a49cbb5b2727.tar.gz |
utests: fix two utest bugs.
Similar as the bug found by junyan, some events are
accessed before assigned.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: He Junyan <junyan.he@inbox.com>
Diffstat (limited to 'utests/runtime_event.cpp')
-rw-r--r-- | utests/runtime_event.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utests/runtime_event.cpp b/utests/runtime_event.cpp index b974f6a6..f8170a36 100644 --- a/utests/runtime_event.cpp +++ b/utests/runtime_event.cpp @@ -28,7 +28,7 @@ void runtime_event(void) locals[0] = 32; clEnqueueNDRangeKernel(queue, kernel, 1, NULL, globals, locals, 2, &ev[0], &ev[2]); - for (cl_uint i = 0; i != sizeof(ev) / sizeof(cl_event); ++i) { + for (cl_uint i = 0; i < 3; ++i) { clGetEventInfo(ev[i], CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof(status), &status, NULL); OCL_ASSERT(status >= CL_SUBMITTED); } |