Struct candle_core::dummy_cuda_backend::CudaDevice
source · pub struct CudaDevice;
Trait Implementations§
source§impl BackendDevice for CudaDevice
impl BackendDevice for CudaDevice
type Storage = CudaStorage
fn new(_: usize) -> Result<Self>
fn set_seed(&self, _: u64) -> Result<()>
fn location(&self) -> DeviceLocation
fn same_device(&self, _: &Self) -> bool
fn zeros_impl(&self, _shape: &Shape, _dtype: DType) -> Result<Self::Storage>
fn ones_impl(&self, _shape: &Shape, _dtype: DType) -> Result<Self::Storage>
source§unsafe fn alloc_uninit(
&self,
_shape: &Shape,
_dtype: DType
) -> Result<Self::Storage>
unsafe fn alloc_uninit( &self, _shape: &Shape, _dtype: DType ) -> Result<Self::Storage>
Safety Read more
fn storage_from_slice<T: WithDType>(&self, _: &[T]) -> Result<Self::Storage>
fn storage_from_cpu_storage(&self, _: &CpuStorage) -> Result<Self::Storage>
fn storage_from_cpu_storage_owned(&self, _: CpuStorage) -> Result<Self::Storage>
fn rand_uniform( &self, _: &Shape, _: DType, _: f64, _: f64 ) -> Result<Self::Storage>
fn rand_normal( &self, _: &Shape, _: DType, _: f64, _: f64 ) -> Result<Self::Storage>
source§fn synchronize(&self) -> Result<()>
fn synchronize(&self) -> Result<()>
Synchronize should block until all the operations on the device are completed.
source§impl Clone for CudaDevice
impl Clone for CudaDevice
source§fn clone(&self) -> CudaDevice
fn clone(&self) -> CudaDevice
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CudaDevice
impl RefUnwindSafe for CudaDevice
impl Send for CudaDevice
impl Sync for CudaDevice
impl Unpin for CudaDevice
impl UnwindSafe for CudaDevice
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