pub struct WgpuDevice;Trait Implementations§
Source§impl BackendDevice for WgpuDevice
impl BackendDevice for WgpuDevice
type Storage = WgpuStorage
fn new(_: usize) -> Result<Self>
fn set_seed(&self, _: u64) -> Result<()>
fn get_current_seed(&self) -> Result<u64>
fn location(&self) -> DeviceLocation
fn same_device(&self, _: &Self) -> bool
fn zeros_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 WgpuDevice
impl Clone for WgpuDevice
Source§fn clone(&self) -> WgpuDevice
fn clone(&self) -> WgpuDevice
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WgpuDevice
impl RefUnwindSafe for WgpuDevice
impl Send for WgpuDevice
impl Sync for WgpuDevice
impl Unpin for WgpuDevice
impl UnsafeUnpin for WgpuDevice
impl UnwindSafe for WgpuDevice
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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