Trait mpi::collective::Root
source · pub trait Root: AsCommunicator {
Show 25 methods
// Required method
fn root_rank(&self) -> Rank;
// Provided methods
fn broadcast_into<Buf>(&self, buffer: &mut Buf)
where Buf: BufferMut + ?Sized { ... }
fn gather_into<S>(&self, sendbuf: &S)
where S: Buffer + ?Sized { ... }
fn gather_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
where S: Buffer + ?Sized,
R: BufferMut + ?Sized { ... }
fn gather_varcount_into<S>(&self, sendbuf: &S)
where S: Buffer + ?Sized { ... }
fn gather_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
where S: Buffer + ?Sized,
R: PartitionedBufferMut + ?Sized { ... }
fn scatter_into<R>(&self, recvbuf: &mut R)
where R: BufferMut + ?Sized { ... }
fn scatter_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
where S: Buffer + ?Sized,
R: BufferMut + ?Sized { ... }
fn scatter_varcount_into<R>(&self, recvbuf: &mut R)
where R: BufferMut + ?Sized { ... }
fn scatter_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
where S: PartitionedBuffer + ?Sized,
R: BufferMut + ?Sized { ... }
fn reduce_into<S, O>(&self, sendbuf: &S, op: O)
where S: Buffer + ?Sized,
O: Operation { ... }
fn reduce_into_root<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
where S: Buffer + ?Sized,
R: BufferMut + ?Sized,
O: Operation { ... }
fn immediate_broadcast_into<'a, Buf, Sc>(
&self,
scope: Sc,
buf: &'a mut Buf
) -> Request<'a, Buf, Sc>
where Buf: 'a + BufferMut + ?Sized,
Sc: Scope<'a> { ... }
fn immediate_gather_into<'a, S, Sc>(
&self,
scope: Sc,
sendbuf: &'a S
) -> Request<'a, S, Sc>
where S: 'a + Buffer + ?Sized,
Sc: Scope<'a> { ... }
fn immediate_gather_into_root<'a, S, R, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
where S: 'a + Buffer + ?Sized,
R: 'a + BufferMut + ?Sized,
Sc: Scope<'a> { ... }
fn immediate_gather_varcount_into<'a, Sc, S>(
&self,
scope: Sc,
sendbuf: &'a S
) -> Request<'a, S, Sc>
where S: 'a + Buffer + ?Sized,
Sc: Scope<'a> { ... }
fn immediate_gather_varcount_into_root<'a, Sc, S, R>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
where S: 'a + Buffer + ?Sized,
R: 'a + PartitionedBufferMut + ?Sized,
Sc: Scope<'a> { ... }
fn immediate_scatter_into<'a, Sc, R>(
&self,
scope: Sc,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
where R: 'a + BufferMut + ?Sized,
Sc: Scope<'a> { ... }
fn immediate_scatter_into_root<'a, Sc, S, R>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
where S: 'a + Buffer + ?Sized,
R: 'a + BufferMut + ?Sized,
Sc: Scope<'a> { ... }
fn immediate_scatter_varcount_into<'a, Sc, R>(
&self,
scope: Sc,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
where R: 'a + BufferMut + ?Sized,
Sc: Scope<'a> { ... }
fn immediate_scatter_varcount_into_root<'a, Sc, S, R>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
where S: 'a + PartitionedBuffer + ?Sized,
R: 'a + BufferMut + ?Sized,
Sc: Scope<'a> { ... }
fn immediate_reduce_into<'a, Sc, S, O>(
&self,
scope: Sc,
sendbuf: &'a S,
op: O
) -> Request<'a, S, Sc>
where S: 'a + Buffer + ?Sized,
O: 'a + Operation,
Sc: Scope<'a> { ... }
fn immediate_reduce_into_root<'a, Sc, S, R, O>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
op: O
) -> Request<'a, R, Sc>
where S: 'a + Buffer + ?Sized,
R: 'a + BufferMut + ?Sized,
O: 'a + Operation,
Sc: Scope<'a> { ... }
fn spawn(
&self,
command: &Command,
maxprocs: Rank
) -> Result<InterCommunicator, MpiError> { ... }
fn spawn_multiple(
&self,
commands: &[Command],
maxprocs: &[Rank]
) -> Result<InterCommunicator, MpiError> { ... }
}
Expand description
Something that can take the role of ‘root’ in a collective operation.
Many collective operations define a ‘root’ process that takes a special role in the communication. These collective operations are implemented as default methods of this trait.
Required Methods§
Provided Methods§
sourcefn broadcast_into<Buf>(&self, buffer: &mut Buf)
fn broadcast_into<Buf>(&self, buffer: &mut Buf)
Broadcast of the contents of a buffer
After the call completes, the Buffer
on all processes in the Communicator
of the Root
&self
will contain what it contains on the Root
.
Examples
See examples/broadcast.rs
Standard section(s)
5.4
sourcefn gather_into<S>(&self, sendbuf: &S)
fn gather_into<S>(&self, sendbuf: &S)
Gather contents of buffers on Root
.
After the call completes, the contents of the Buffer
s on all ranks will be
concatenated into the Buffer
on Root
.
All send Buffer
s must have the same count of elements.
This function must be called on all non-root processes.
Examples
See examples/gather.rs
Standard section(s)
5.5
sourcefn gather_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn gather_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
Gather contents of buffers on Root
.
After the call completes, the contents of the Buffer
s on all ranks will be
concatenated into the Buffer
on Root
.
All send Buffer
s must have the same count of elements.
This function must be called on the root process.
Examples
See examples/gather.rs
Standard section(s)
5.5
sourcefn gather_varcount_into<S>(&self, sendbuf: &S)
fn gather_varcount_into<S>(&self, sendbuf: &S)
Gather contents of buffers on Root
.
After the call completes, the contents of the Buffer
s on all ranks will be
concatenated into the Buffer
on Root
.
The send Buffer
s may contain different counts of elements on different processes. The
distribution of elements in the receive Buffer
is specified via Partitioned
.
This function must be called on all non-root processes.
Examples
See examples/gather_varcount.rs
Standard section(s)
5.5
sourcefn gather_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn gather_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
Gather contents of buffers on Root
.
After the call completes, the contents of the Buffer
s on all ranks will be
concatenated into the Buffer
on Root
.
The send Buffer
s may contain different counts of elements on different processes. The
distribution of elements in the receive Buffer
is specified via Partitioned
.
This function must be called on the root process.
Examples
See examples/gather_varcount.rs
Standard section(s)
5.5
sourcefn scatter_into<R>(&self, recvbuf: &mut R)
fn scatter_into<R>(&self, recvbuf: &mut R)
Scatter contents of a buffer on the root process to all processes.
After the call completes each participating process will have received a part of the send
Buffer
on the root process.
All send Buffer
s must have the same count of elements.
This function must be called on all non-root processes.
Examples
See examples/scatter.rs
Standard section(s)
5.6
sourcefn scatter_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn scatter_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
Scatter contents of a buffer on the root process to all processes.
After the call completes each participating process will have received a part of the send
Buffer
on the root process.
All send Buffer
s must have the same count of elements.
This function must be called on the root process.
Examples
See examples/scatter.rs
Standard section(s)
5.6
sourcefn scatter_varcount_into<R>(&self, recvbuf: &mut R)
fn scatter_varcount_into<R>(&self, recvbuf: &mut R)
Scatter contents of a buffer on the root process to all processes.
After the call completes each participating process will have received a part of the send
Buffer
on the root process.
The send Buffer
may contain different counts of elements for different processes. The
distribution of elements in the send Buffer
is specified via Partitioned
.
This function must be called on all non-root processes.
Examples
See examples/scatter_varcount.rs
Standard section(s)
5.6
sourcefn scatter_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
fn scatter_varcount_into_root<S, R>(&self, sendbuf: &S, recvbuf: &mut R)
Scatter contents of a buffer on the root process to all processes.
After the call completes each participating process will have received a part of the send
Buffer
on the root process.
The send Buffer
may contain different counts of elements for different processes. The
distribution of elements in the send Buffer
is specified via Partitioned
.
This function must be called on the root process.
Examples
See examples/scatter_varcount.rs
Standard section(s)
5.6
sourcefn reduce_into<S, O>(&self, sendbuf: &S, op: O)
fn reduce_into<S, O>(&self, sendbuf: &S, op: O)
Performs a global reduction under the operation op
of the input data in sendbuf
and
stores the result on the Root
process.
This function must be called on all non-root processes.
Examples
See examples/reduce.rs
Standard section(s)
5.9.1
sourcefn reduce_into_root<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
fn reduce_into_root<S, R, O>(&self, sendbuf: &S, recvbuf: &mut R, op: O)
Performs a global reduction under the operation op
of the input data in sendbuf
and
stores the result on the Root
process.
This function must be called on the root process.
Examples
See examples/reduce.rs
Standard section(s)
5.9.1
sourcefn immediate_broadcast_into<'a, Buf, Sc>(
&self,
scope: Sc,
buf: &'a mut Buf
) -> Request<'a, Buf, Sc>
fn immediate_broadcast_into<'a, Buf, Sc>( &self, scope: Sc, buf: &'a mut Buf ) -> Request<'a, Buf, Sc>
Initiate broadcast of a value from the Root
process to all other processes.
Examples
See examples/immediate_broadcast.rs
Standard section(s)
5.12.2
sourcefn immediate_gather_into<'a, S, Sc>(
&self,
scope: Sc,
sendbuf: &'a S
) -> Request<'a, S, Sc>
fn immediate_gather_into<'a, S, Sc>( &self, scope: Sc, sendbuf: &'a S ) -> Request<'a, S, Sc>
Initiate non-blocking gather of the contents of all sendbuf
s on Root
&self
.
This function must be called on all non-root processes.
Examples
See examples/immediate_gather.rs
Standard section(s)
5.12.3
sourcefn immediate_gather_into_root<'a, S, R, Sc>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
fn immediate_gather_into_root<'a, S, R, Sc>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
Initiate non-blocking gather of the contents of all sendbuf
s on Root
&self
.
This function must be called on the root processes.
Examples
See examples/immediate_gather.rs
Standard section(s)
5.12.3
sourcefn immediate_gather_varcount_into<'a, Sc, S>(
&self,
scope: Sc,
sendbuf: &'a S
) -> Request<'a, S, Sc>
fn immediate_gather_varcount_into<'a, Sc, S>( &self, scope: Sc, sendbuf: &'a S ) -> Request<'a, S, Sc>
Initiate non-blocking gather of the contents of all sendbuf
s on Root
&self
.
This function must be called on all non-root processes.
Examples
See examples/immediate_gather_varcount.rs
Standard section(s)
5.12.3
sourcefn immediate_gather_varcount_into_root<'a, Sc, S, R>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
fn immediate_gather_varcount_into_root<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
Initiate non-blocking gather of the contents of all sendbuf
s on Root
&self
.
This function must be called on the root processes.
Examples
See examples/immediate_gather_varcount.rs
Standard section(s)
5.12.3
sourcefn immediate_scatter_into<'a, Sc, R>(
&self,
scope: Sc,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
fn immediate_scatter_into<'a, Sc, R>( &self, scope: Sc, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
Initiate non-blocking scatter of the contents of sendbuf
from Root
&self
.
This function must be called on all non-root processes.
Examples
See examples/immediate_scatter.rs
Standard section(s)
5.12.4
sourcefn immediate_scatter_into_root<'a, Sc, S, R>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
fn immediate_scatter_into_root<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
Initiate non-blocking scatter of the contents of sendbuf
from Root
&self
.
This function must be called on the root processes.
Examples
See examples/immediate_scatter.rs
Standard section(s)
5.12.4
sourcefn immediate_scatter_varcount_into<'a, Sc, R>(
&self,
scope: Sc,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
fn immediate_scatter_varcount_into<'a, Sc, R>( &self, scope: Sc, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
Initiate non-blocking scatter of the contents of sendbuf
from Root
&self
.
This function must be called on all non-root processes.
Examples
See examples/immediate_scatter_varcount.rs
Standard section(s)
5.12.4
sourcefn immediate_scatter_varcount_into_root<'a, Sc, S, R>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R
) -> Request<'a, R, Sc>
fn immediate_scatter_varcount_into_root<'a, Sc, S, R>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R ) -> Request<'a, R, Sc>
Initiate non-blocking scatter of the contents of sendbuf
from Root
&self
.
This function must be called on the root processes.
Examples
See examples/immediate_scatter_varcount.rs
Standard section(s)
5.12.4
sourcefn immediate_reduce_into<'a, Sc, S, O>(
&self,
scope: Sc,
sendbuf: &'a S,
op: O
) -> Request<'a, S, Sc>
fn immediate_reduce_into<'a, Sc, S, O>( &self, scope: Sc, sendbuf: &'a S, op: O ) -> Request<'a, S, Sc>
Initiates a non-blacking global reduction under the operation op
of the input data in
sendbuf
and stores the result on the Root
process.
This function must be called on all non-root processes.
Examples
See examples/immediate_reduce.rs
Standard section(s)
5.12.7
sourcefn immediate_reduce_into_root<'a, Sc, S, R, O>(
&self,
scope: Sc,
sendbuf: &'a S,
recvbuf: &'a mut R,
op: O
) -> Request<'a, R, Sc>
fn immediate_reduce_into_root<'a, Sc, S, R, O>( &self, scope: Sc, sendbuf: &'a S, recvbuf: &'a mut R, op: O ) -> Request<'a, R, Sc>
Initiates a non-blocking global reduction under the operation op
of the input data in
sendbuf
and stores the result on the Root
process.
Examples
See examples/immediate_reduce.rs
This function must be called on the root process.
Standard section(s)
5.12.7