Heyho,
i try to use an Buffer Object (CL_MEM_USE_HOST_PTR) to terminate an while loop on the OpenCL Device after n seconds,
but the return Buffers are all empty when i set the value of the pointer....what am i missing?
| while(1) { |
| time(&end_time); |
| elapsed = (int) (end_time - start_time); |
| if (elapsed >= 6 ) |
| break; |
| } |
| clEnqueueMapBuffer( commandQueue, |
| GLOBAL_FINISHED_Buffer, |
| CL_TRUE, |
| CL_MAP_WRITE, |
| 0, |
| sizeof(cl_int), |
| 0, |
| NULL, |
| NULL, |
| &status); |
{
| print_debug((char *)"Error: Waiting for kernel run to finish. (clEnqueueMapBuffer)\n"); |
| return 1; |
}
--
Srdja