Function opencl3::event::set_event_callback

source ยท
pub fn set_event_callback(
    event: *mut c_void,
    command_exec_callback_type: i32,
    pfn_notify: extern "C" fn(_: *mut c_void, _: i32, _: *mut c_void),
    user_data: *mut c_void
) -> Result<(), i32>
Expand description

Register a user callback function for a specific command execution status, Calls clSetEventCallback to register a callback function.

  • event - the OpenCL event.
  • pfn_notify - function pointer to the callback function.
  • user_data - passed as an argument when pfn_notify is called, or ptr::null_mut().

returns an empty Result or the error code from the OpenCL C API function.