pub struct Tensor<C: Computable> {
pub data: Vec<C>,
pub shape: Shape,
}Fields§
§data: Vec<C>§shape: ShapeImplementations§
Trait Implementations§
Source§impl<T: Computable> BaseTensor for Tensor<T>
impl<T: Computable> BaseTensor for Tensor<T>
Source§impl<'a, C: Computable + 'static> FromMut<Tensor<C>> for MyCPUTensor<'a, C>
impl<'a, C: Computable + 'static> FromMut<Tensor<C>> for MyCPUTensor<'a, C>
Source§impl<C: Computable> Generalizable for Tensor<C>
impl<C: Computable> Generalizable for Tensor<C>
Source§impl<C: Computable> IndexAble for Tensor<C>
impl<C: Computable> IndexAble for Tensor<C>
Source§impl<C: Computable + 'static> MemoryMapable<CPUStorage> for Tensor<C>
impl<C: Computable + 'static> MemoryMapable<CPUStorage> for Tensor<C>
type Mapped<'a> = MyCPUTensor<'a, C>
fn get_struct_map(&self) -> HashMap<String, String>
fn to_memory_bytes(&self) -> Vec<u8> ⓘ
fn from_memory_bytes(_bytes: Vec<u8>) -> Self
fn into_processor_mapped(self) -> <CPUStorage as Storage>::MappedType<Self>
Source§impl<C: Computable + 'static> MemoryMapable<GPUStorage> for Tensor<C>
impl<C: Computable + 'static> MemoryMapable<GPUStorage> for Tensor<C>
type Mapped<'a> = usize
fn get_struct_map(&self) -> HashMap<String, String>
fn to_memory_bytes(&self) -> Vec<u8> ⓘ
fn from_memory_bytes(_bytes: Vec<u8>) -> Self
fn into_processor_mapped(self) -> <GPUStorage as Storage>::MappedType<Self>
Auto Trait Implementations§
impl<C> Freeze for Tensor<C>
impl<C> RefUnwindSafe for Tensor<C>where
C: RefUnwindSafe,
impl<C> Send for Tensor<C>
impl<C> Sync for Tensor<C>
impl<C> Unpin for Tensor<C>where
C: Unpin,
impl<C> UnwindSafe for Tensor<C>where
C: UnwindSafe,
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