|Home > Execution stages of an OpenCL application > Reading the results|
After your kernels have finished execution, you must make the result accessible to the host. To access the results from the kernel, use clEnqueueMapBuffer() to map the buffer into host memory.
local_buffer = clEnqueueMapBuffer(queue, buffer, CL_NON_BLOCKING, CL_MAP_READ, 0, (data_size, num_deps, &deps, NULL, &err); ASSERT(CL_SUCCESS == err);
clFinish()must be called to make the buffer available.
CL_NON_BLOCKINGin the previous example. If you change this parameter in
CL_BLOCKING, the call becomes a blocking call and the read must be completed before