MCPcopy Create free account
hub / github.com/boostorg/compute / set_callback

Method set_callback

include/boost/compute/event.hpp:229–239  ·  view source on GitHub ↗

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}

Source from the content-addressed store, hash-verified

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).

Callers 3

BOOST_AUTO_TEST_CASEFunction · 0.80
futureClass · 0.80
future<void>Class · 0.80

Calls 1

opencl_errorClass · 0.85

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64