pub struct PartitionState { /* private fields */ }Expand description
Rank-local mutable-state geometry and its architecture-global layer range.
Implementations§
Source§impl PartitionState
impl PartitionState
Sourcepub fn new(
layout: StateLayout,
global_layer_offset: usize,
) -> Result<Self, ArchitecturePartitionError>
pub fn new( layout: StateLayout, global_layer_offset: usize, ) -> Result<Self, ArchitecturePartitionError>
Attaches a local state layout at one architecture-global layer offset.
Sourcepub const fn layout(&self) -> &StateLayout
pub const fn layout(&self) -> &StateLayout
Returns the exact rank-local state layout.
Sourcepub const fn global_layer_offset(&self) -> usize
pub const fn global_layer_offset(&self) -> usize
Returns the first architecture-global layer represented by the layout.
Sourcepub fn global_layers(&self) -> Range<usize> ⓘ
pub fn global_layers(&self) -> Range<usize> ⓘ
Returns the architecture-global state-layer range.
Sourcepub fn prompt_cache_identity<B, M>(
&self,
architecture: &M,
topology: PromptCacheTopology,
) -> Result<PromptCacheModelIdentity, ArchitecturePartitionError>
pub fn prompt_cache_identity<B, M>( &self, architecture: &M, topology: PromptCacheTopology, ) -> Result<PromptCacheModelIdentity, ArchitecturePartitionError>
Derives prompt-cache identity from this canonical state partition.
Trait Implementations§
Source§impl Clone for PartitionState
impl Clone for PartitionState
Source§fn clone(&self) -> PartitionState
fn clone(&self) -> PartitionState
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 moreSource§impl Debug for PartitionState
impl Debug for PartitionState
impl Eq for PartitionState
Source§impl PartialEq for PartitionState
impl PartialEq for PartitionState
impl StructuralPartialEq for PartitionState
Auto Trait Implementations§
impl Freeze for PartitionState
impl RefUnwindSafe for PartitionState
impl Send for PartitionState
impl Sync for PartitionState
impl Unpin for PartitionState
impl UnsafeUnpin for PartitionState
impl UnwindSafe for PartitionState
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