pub trait Collectives:
Sealed
+ Send
+ Sync {
// Required methods
fn rank(&self) -> u32;
fn size(&self) -> u32;
fn allreduce_max_u8(&self, v: u8) -> u8;
fn allreduce_sum_u64(&self, buffer: &mut [u64]);
fn allreduce_sum_f64(&self, buffer: &mut [f64]);
fn barrier(&self);
// Provided method
fn check_consistency(&self, fingerprint: u64) { ... }
}Expand description
The group operations a partition needs besides the exchange: its rank, the reductions, and a barrier.
Every partition must issue the identical sequence of collective and transport calls, and every reduction must return the identical value on every partition.
Sealed: implemented only by the in-process, solo and mpi::MpiTransport transports.
Required Methods§
Sourcefn allreduce_max_u8(&self, v: u8) -> u8
fn allreduce_max_u8(&self, v: u8) -> u8
Maximum of v over the group.
Sourcefn allreduce_sum_u64(&self, buffer: &mut [u64])
fn allreduce_sum_u64(&self, buffer: &mut [u64])
Element-wise wrapping sum of buffer over the group, in place; every partition passes the same length.
Sourcefn allreduce_sum_f64(&self, buffer: &mut [f64])
fn allreduce_sum_f64(&self, buffer: &mut [f64])
Element-wise sum of buffer over the group, in place, bitwise identical on every partition.
The combination order is the implementation’s, so the result may differ by rounding from a serial sum; a slot only one partition fills is exact.
Provided Methods§
Sourcefn check_consistency(&self, fingerprint: u64)
fn check_consistency(&self, fingerprint: u64)
Panic unless every partition passed the same fingerprint; one collective.