Trait opencv::core::StreamTrait

source ·
pub trait StreamTrait: StreamTraitConst {
    // Required method
    fn as_raw_mut_Stream(&mut self) -> *mut c_void;

    // Provided methods
    fn wait_for_completion(&mut self) -> Result<()> { ... }
    fn wait_event(&mut self, event: &impl EventTraitConst) -> Result<()> { ... }
    fn enqueue_host_callback(
        &mut self,
        callback: Stream_StreamCallback
    ) -> Result<()> { ... }
}
Expand description

Mutable methods for core::Stream

Required Methods§

Provided Methods§

source

fn wait_for_completion(&mut self) -> Result<()>

Blocks the current CPU thread until all operations in the stream are complete.

source

fn wait_event(&mut self, event: &impl EventTraitConst) -> Result<()>

Makes a compute stream wait on an event.

source

fn enqueue_host_callback( &mut self, callback: Stream_StreamCallback ) -> Result<()>

Adds a callback to be called on the host after all currently enqueued items in the stream have completed.

Note: Callbacks must not make any CUDA API calls. Callbacks must not perform any synchronization that may depend on outstanding device work or other callbacks that are not mandated to run earlier. Callbacks without a mandated order (in independent streams) execute in undefined order and may be serialized.

Object Safety§

This trait is not object safe.

Implementors§