pub struct DistributedArray<T> { /* private fields */ }
Expand description
Distributed array structure for parallel processing across nodes
Implementations§
Source§impl<T> DistributedArray<T>
impl<T> DistributedArray<T>
Sourcepub fn new(
local_chunk: Vec<T>,
total_size: usize,
chunk_start: usize,
nodeid: String,
) -> Self
pub fn new( local_chunk: Vec<T>, total_size: usize, chunk_start: usize, nodeid: String, ) -> Self
Create a new distributed array chunk
Sourcepub fn local_data(&self) -> &[T]
pub fn local_data(&self) -> &[T]
Get the local chunk of the distributed array
Sourcepub fn local_size(&self) -> usize
pub fn local_size(&self) -> usize
Get the size of the local chunk
Sourcepub fn total_size(&self) -> usize
pub fn total_size(&self) -> usize
Get the total size across all nodes
Sourcepub fn chunk_start(&self) -> usize
pub fn chunk_start(&self) -> usize
Get the global start index of this chunk
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for DistributedArray<T>
impl<T> RefUnwindSafe for DistributedArray<T>where
T: RefUnwindSafe,
impl<T> Send for DistributedArray<T>where
T: Send,
impl<T> Sync for DistributedArray<T>where
T: Sync,
impl<T> Unpin for DistributedArray<T>where
T: Unpin,
impl<T> UnwindSafe for DistributedArray<T>where
T: 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> 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