diff options
author | Denis Steckelmacher <steckdenis@yahoo.fr> | 2011-06-21 20:09:59 +0200 |
---|---|---|
committer | Denis Steckelmacher <steckdenis@yahoo.fr> | 2011-06-21 20:09:59 +0200 |
commit | 13623b4cd50e13860da151f1bf8dad6a9dd3bed6 (patch) | |
tree | 5c5932c3abfd52fa33b5661dd89579922a0fdba2 /tests | |
parent | e7c3830719aa5547bca369dc17b4b6e93da6685f (diff) |
Refactoring of the buffer events, implement clUnmapMemObject.
It's now cleaner and more C++-friendly. It's also simpler to implement
clUnmapMemObject.
This new structure will hopefully ease the implementation of all the
image events.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_commandqueue.cpp | 6 | ||||
-rw-r--r-- | tests/test_mem.cpp | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/tests/test_commandqueue.cpp b/tests/test_commandqueue.cpp index dba684a..236b5d8 100644 --- a/tests/test_commandqueue.cpp +++ b/tests/test_commandqueue.cpp @@ -309,6 +309,12 @@ START_TEST (test_events) "unable to map a buffer containing what the buffer contains" ); + result = clEnqueueUnmapMemObject(queue, buf, data, 0, 0, 0); + fail_if( + result != CL_SUCCESS, + "unable to unmap a mapped buffer" + ); + // Get timing information about the event cl_ulong timing_queued, timing_submit, timing_start, timing_end; diff --git a/tests/test_mem.cpp b/tests/test_mem.cpp index 46f0a71..9a965fa 100644 --- a/tests/test_mem.cpp +++ b/tests/test_mem.cpp @@ -71,10 +71,10 @@ START_TEST (test_create_sub_buffer) cl_int result; char s[] = "Hello, world !"; - cl_buffer_region create_info = { // "Hello, [world] !" - .origin = 7, - .size = 5 - }; + cl_buffer_region create_info; // "Hello, [world] !" + + create_info.origin = 7; + create_info.size = 5; ctx = clCreateContextFromType(0, CL_DEVICE_TYPE_CPU, 0, 0, &result); fail_if( |