pub unsafe extern "C" fn hipStreamAddCallback(
    stream: *mut ihipStream_t,
    callback: Option<unsafe extern "C" fn(_: *mut ihipStream_t, _: hipError_t, _: *mut c_void)>,
    userData: *mut c_void,
    flags: u32
) -> hipError_t
Expand description

@brief Adds a callback to be called on the host after all currently enqueued items in the stream have completed. For each hipStreamAddCallback call, a callback will be executed exactly once. The callback will block later work in the stream until it is finished. @param[in] stream - Stream to add callback to @param[in] callback - The function to call once preceding stream operations are complete @param[in] userData - User specified data to be passed to the callback function @param[in] flags - Reserved for future use, must be 0 @return #hipSuccess, #hipErrorInvalidHandle, #hipErrorNotSupported

@see hipStreamCreate, hipStreamCreateWithFlags, hipStreamQuery, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy, hipStreamCreateWithPriority