pub struct CpuDevice;Implementations§
Trait Implementations§
Source§impl Device for CpuDevice
impl Device for CpuDevice
type Slice = CpuStorage
type Func = Func
unsafe fn allocate_uninit( &self, dtype: DType, len: usize, ) -> Result<<CpuDevice as Device>::Slice, Error>
fn synchronize(&self) -> Result<(), Error>
fn use_grid() -> bool
fn compile( &self, kernel: &Kernel, name: Option<&str>, ) -> Result<<CpuDevice as Device>::Func, Error>
fn run( &self, f: &<CpuDevice as Device>::Func, args: &mut [&mut <CpuDevice as Device>::Slice], ) -> Result<(), Error>
fn matmul( &self, dst: &mut <CpuDevice as Device>::Slice, lhs: &<CpuDevice as Device>::Slice, rhs: &<CpuDevice as Device>::Slice, bmnk: (usize, usize, usize, usize), lhs_l: &Layout, rhs_l: &Layout, ) -> Result<(), Error>
impl Copy for CpuDevice
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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