Struct candle_core::cpu_backend::CpuDevice
source · 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 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