pub struct TensorSlice {
pub name: String,
pub spec: SliceSpec,
pub data: Vec<f32>,
pub version: u64,
pub dirty: bool,
}Expand description
A named, versioned, copy-on-write slice of a tensor.
Fields§
§name: StringHuman-readable name used as the registry key.
spec: SliceSpecThe region of the parent tensor this slice covers.
data: Vec<f32>Flattened element data; length must equal spec.element_count().
version: u64Monotonically increasing write counter; starts at 0.
dirty: booltrue when the slice has been written since the last TensorSliceManager::flush_all.
Trait Implementations§
Source§impl Clone for TensorSlice
impl Clone for TensorSlice
Source§fn clone(&self) -> TensorSlice
fn clone(&self) -> TensorSlice
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 TensorSlice
impl RefUnwindSafe for TensorSlice
impl Send for TensorSlice
impl Sync for TensorSlice
impl Unpin for TensorSlice
impl UnsafeUnpin for TensorSlice
impl UnwindSafe for TensorSlice
Blanket Implementations§
impl<T> Allocation for T
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,
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