Registers a function to be called when the event status changes to \p status (by default CL_COMPLETE). The callback is passed the OpenCL event object, the event status, and a pointer to arbitrary user data. \see_opencl_ref{clSetEventCallback} \opencl_version_warning{1,1}
| 227 | /// |
| 228 | /// \opencl_version_warning{1,1} |
| 229 | void set_callback(void (BOOST_COMPUTE_CL_CALLBACK *callback)( |
| 230 | cl_event event, cl_int status, void *user_data |
| 231 | ), |
| 232 | cl_int status = CL_COMPLETE, |
| 233 | void *user_data = 0) |
| 234 | { |
| 235 | cl_int ret = clSetEventCallback(m_event, status, callback, user_data); |
| 236 | if(ret != CL_SUCCESS){ |
| 237 | BOOST_THROW_EXCEPTION(opencl_error(ret)); |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | /// Registers a generic function to be called when the event status |
| 242 | /// changes to \p status (by default \c CL_COMPLETE). |