pub enum CpuStorage {
F16(Vec<f16>),
BF16(Vec<bf16>),
F32(Vec<f32>),
F64(Vec<f64>),
U8(Vec<u8>),
U32(Vec<u32>),
I64(Vec<i64>),
}Expand description
Re-export CPU backend. Storage of tensor data in CPU memory.
Each variant holds a Vec of the corresponding Rust type. Operations pattern-match on this enum to dispatch to typed code.
Variants§
Trait Implementations§
Source§impl BackendStorage for CpuStorage
impl BackendStorage for CpuStorage
Source§impl Clone for CpuStorage
impl Clone for CpuStorage
Source§fn clone(&self) -> CpuStorage
fn clone(&self) -> CpuStorage
Returns a duplicate 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 CpuStorage
impl RefUnwindSafe for CpuStorage
impl Send for CpuStorage
impl Sync for CpuStorage
impl Unpin for CpuStorage
impl UnwindSafe for CpuStorage
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