pub struct Compaction {
pub runs: Vec<(u64, u64)>,
pub entries: u64,
}Expand description
The machine’s memory without the matrices its matvec jobs stream: each streamed tensor’s bytes, to the next line,
taken out, and every other byte moved down by the bytes taken out below it. The hybrid engine’s flat space holds the
memory so, and after it each streamed tensor’s stream entry (StreamEntry, STREAM_ENTRY_LINES lines) in the
runs’ order; the tables give the reference engine every address placed so, a streamed tensor’s its entry’s.
Fields§
§runs: Vec<(u64, u64)>The runs taken out, [start, end) in order.
entries: u64The compacted memory’s bytes to the next line: where the stream entries start.
Implementations§
Source§impl Compaction
impl Compaction
Sourcepub fn of(machine: &MachineLayout) -> Compaction
pub fn of(machine: &MachineLayout) -> Compaction
The runs of machine’s streamed tensors.
Sourcepub fn space_bytes(&self) -> u64
pub fn space_bytes(&self) -> u64
The flat space’s bytes: the compacted memory and the stream entries.
Sourcepub fn find(&self, at: u64) -> Option<u64>
pub fn find(&self, at: u64) -> Option<u64>
Where the hybrid engine finds what logical byte at holds: its compacted place, or for a streamed tensor’s
first byte the tensor’s stream entry; none for the rest of a streamed tensor’s bytes.
Sourcepub fn space(&self, memory: &[u8], entries: &[StreamEntry]) -> Vec<u8> ⓘ
pub fn space(&self, memory: &[u8], entries: &[StreamEntry]) -> Vec<u8> ⓘ
The flat space over memory: the memory compacted, zeros to the next line, then the streamed tensors’
entries, one a run in the runs’ order.
Trait Implementations§
Source§impl Clone for Compaction
impl Clone for Compaction
Source§fn clone(&self) -> Compaction
fn clone(&self) -> Compaction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Compaction
impl Debug for Compaction
Source§impl PartialEq for Compaction
impl PartialEq for Compaction
impl Eq for Compaction
impl StructuralPartialEq for Compaction
Auto Trait Implementations§
impl Freeze for Compaction
impl RefUnwindSafe for Compaction
impl Send for Compaction
impl Sync for Compaction
impl Unpin for Compaction
impl UnsafeUnpin for Compaction
impl UnwindSafe for Compaction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.