pub struct Stream { /* private fields */ }
Expand description
A stream of evaluation attached to a particular device.
Typically, this is used via the stream:
parameter on a method with a StreamOrDevice:
Implementations§
Source§impl Stream
impl Stream
Sourcepub fn task_local_or_default() -> Self
pub fn task_local_or_default() -> Self
Create a new stream on the default device, or return the task local default stream if present.
Sourcepub fn task_local_or_cpu() -> Self
pub fn task_local_or_cpu() -> Self
Create a new stream on the default cpu device, or return the task local default stream if present.
Sourcepub fn task_local_or_gpu() -> Self
pub fn task_local_or_gpu() -> Self
Create a new stream on the default gpu device, or return the task local default stream if present.
Sourcepub fn try_default_on_device(device: &Device) -> Result<Stream>
pub fn try_default_on_device(device: &Device) -> Result<Stream>
Try to get the default stream on the given device.
Sourcepub fn new_with_device(device: &Device) -> Stream
pub fn new_with_device(device: &Device) -> Stream
Create a new stream on the given device
Trait Implementations§
Source§impl AsRef<Stream> for StreamOrDevice
impl AsRef<Stream> for StreamOrDevice
Auto Trait Implementations§
impl Freeze for Stream
impl RefUnwindSafe for Stream
impl !Send for Stream
impl !Sync for Stream
impl Unpin for Stream
impl UnwindSafe for Stream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Convert into an
Option
.