pub struct CpuDevice;
Trait Implementations§
Source§impl BackendDevice for CpuDevice
impl BackendDevice for CpuDevice
type Storage = CpuStorage
fn location(&self) -> DeviceLocation
fn same_device(&self, _: &Self) -> bool
fn storage_from_cpu_storage(&self, s: &CpuStorage) -> Result<Self::Storage>
fn new(_: usize) -> Result<Self>
fn set_seed(&self, _seed: u64) -> Result<()>
fn rand_uniform( &self, shape: &Shape, dtype: DType, min: f64, max: f64, ) -> Result<CpuStorage>
fn rand_normal( &self, shape: &Shape, dtype: DType, mean: f64, std: f64, ) -> Result<CpuStorage>
fn ones_impl(&self, shape: &Shape, dtype: DType) -> Result<CpuStorage>
fn zeros_impl(&self, shape: &Shape, dtype: DType) -> Result<CpuStorage>
Auto Trait Implementations§
impl Freeze for CpuDevice
impl RefUnwindSafe for CpuDevice
impl Send for CpuDevice
impl Sync for CpuDevice
impl Unpin for CpuDevice
impl UnwindSafe for CpuDevice
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 more