pub struct MockDistributedArray<T: Clone + 'static> { /* private fields */ }
Expand description
A mock distributed array implementation.
Implementations§
Trait Implementations§
Source§impl<T: Clone + Send + Sync + 'static> ArrayProtocol for MockDistributedArray<T>
impl<T: Clone + Send + Sync + 'static> ArrayProtocol for MockDistributedArray<T>
Source§fn array_function(
&self,
func: &ArrayFunction,
_types: &[TypeId],
_args: &[Box<dyn Any>],
_kwargs: &HashMap<String, Box<dyn Any>>,
) -> Result<Box<dyn Any>, NotImplemented>
fn array_function( &self, func: &ArrayFunction, _types: &[TypeId], _args: &[Box<dyn Any>], _kwargs: &HashMap<String, Box<dyn Any>>, ) -> Result<Box<dyn Any>, NotImplemented>
Implementation of the array protocol. Read more
Source§fn shape(&self) -> &[usize]
fn shape(&self) -> &[usize]
Get the shape of the array (default implementation returns empty slice)
Source§fn box_clone(&self) -> Box<dyn ArrayProtocol>
fn box_clone(&self) -> Box<dyn ArrayProtocol>
Clone this array protocol object.
Source§impl<T: Clone + Clone + 'static> Clone for MockDistributedArray<T>
impl<T: Clone + Clone + 'static> Clone for MockDistributedArray<T>
Source§fn clone(&self) -> MockDistributedArray<T>
fn clone(&self) -> MockDistributedArray<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Clone + Send + Sync + 'static> DistributedArray for MockDistributedArray<T>
impl<T: Clone + Send + Sync + 'static> DistributedArray for MockDistributedArray<T>
Source§fn distribution_info(&self) -> HashMap<String, String>
fn distribution_info(&self) -> HashMap<String, String>
Get information about the distribution of this array.
Source§fn gather(&self) -> CoreResult<Box<dyn ArrayProtocol>>
fn gather(&self) -> CoreResult<Box<dyn ArrayProtocol>>
Gather the distributed array to a single node.
Source§fn scatter(&self, _chunks: usize) -> CoreResult<Box<dyn DistributedArray>>
fn scatter(&self, _chunks: usize) -> CoreResult<Box<dyn DistributedArray>>
Scatter a regular array to a distributed array.
Source§fn is_distributed(&self) -> bool
fn is_distributed(&self) -> bool
Check if this array is distributed.
Auto Trait Implementations§
impl<T> Freeze for MockDistributedArray<T>
impl<T> RefUnwindSafe for MockDistributedArray<T>where
T: RefUnwindSafe,
impl<T> Send for MockDistributedArray<T>where
T: Send,
impl<T> Sync for MockDistributedArray<T>where
T: Sync,
impl<T> Unpin for MockDistributedArray<T>where
T: Unpin,
impl<T> UnwindSafe for MockDistributedArray<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> 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