diff options
Diffstat (limited to 'utests/builtin_local_size.cpp')
-rw-r--r-- | utests/builtin_local_size.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/utests/builtin_local_size.cpp b/utests/builtin_local_size.cpp index a9dac2e1..491175db 100644 --- a/utests/builtin_local_size.cpp +++ b/utests/builtin_local_size.cpp @@ -65,13 +65,8 @@ static void builtin_local_size(void) // Run the kernel OCL_NDRANGE( dim ); - err = clEnqueueReadBuffer( queue, buf[0], CL_TRUE, 0, sizeof(int), &local_size, 0, NULL, NULL); - if (err != CL_SUCCESS) - { - printf("Error: Failed to read output array! %d\n", err); - exit(1); - } - + OCL_MAP_BUFFER(0); + local_size = ((int*)buf_data[0])[0]; #if udebug printf("get_local_size(%d) = %d (dimension:%d)\n", dim_arg_global, local_size, dim); #endif @@ -81,6 +76,7 @@ static void builtin_local_size(void) { OCL_ASSERT( local_size == 1); } + OCL_UNMAP_BUFFER(0); } } } |