Skip to main content

with_device

Function with_device 

Source
pub fn with_device<F, T>(device: Device, f: F) -> T
where F: FnOnce() -> T,
Expand description

Uses the default stream on device for operations constructed during f.

This is equivalent to creating a stream for the device and passing it to with_stream. Scopes are synchronous, thread-local, nestable, and panic-safe.