pub struct Communicator<C> { /* private fields */ }Implementations§
Source§impl<C> Communicator<C>
impl<C> Communicator<C>
pub fn new<K, E>(
contexts: Vec<C>,
initialize: impl FnOnce(&C) -> Result<K, E>,
) -> Result<(Self, K), E>where
E: From<InProcessError>,
pub fn world_size(&self) -> usize
pub const fn transport(&self) -> CollectiveTransport
pub fn collective<T, D, E>(&self) -> InProcessCollective<'_, T, D, E>
pub fn barrier(&self) -> Result<CollectiveStats, InProcessError>
Source§impl<B: Backend> Communicator<TensorDevice<B>>
impl<B: Backend> Communicator<TensorDevice<B>>
pub fn tensor_collective<T: TensorElement>( &self, ) -> InProcessCollective<'_, T, TensorDevice<B>, TensorDeviceError>
Trait Implementations§
Source§impl<C: Clone> Clone for Communicator<C>
impl<C: Clone> Clone for Communicator<C>
Source§fn clone(&self) -> Communicator<C>
fn clone(&self) -> Communicator<C>
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<C> Freeze for Communicator<C>
impl<C> RefUnwindSafe for Communicator<C>where
Vec<C>: RefUnwindSafe,
impl<C> Send for Communicator<C>
impl<C> Sync for Communicator<C>
impl<C> Unpin for Communicator<C>
impl<C> UnsafeUnpin for Communicator<C>where
Vec<C>: UnsafeUnpin,
impl<C> UnwindSafe for Communicator<C>where
Vec<C>: 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