[][src]Function opencl3::event::set_event_callback

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>

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.