Trait mpi::point_to_point::Source
[−]
[src]
pub unsafe trait Source: AsCommunicator { fn source_rank(&self) -> Rank; fn probe_with_tag(&self, tag: Tag) -> Status { ... } fn probe(&self) -> Status { ... } fn matched_probe_with_tag(&self, tag: Tag) -> (Message, Status) { ... } fn matched_probe(&self) -> (Message, Status) { ... } fn receive_with_tag<Msg>(&self, tag: Tag) -> (Msg, Status)
where
Msg: Equivalence, { ... } fn receive<Msg>(&self) -> (Msg, Status)
where
Msg: Equivalence, { ... } fn receive_into_with_tag<Buf: ?Sized>(
&self,
buf: &mut Buf,
tag: Tag
) -> Status
where
Buf: BufferMut, { ... } fn receive_into<Buf: ?Sized>(&self, buf: &mut Buf) -> Status
where
Buf: BufferMut, { ... } fn receive_vec_with_tag<Msg>(&self, tag: Tag) -> (Vec<Msg>, Status)
where
Msg: Equivalence, { ... } fn receive_vec<Msg>(&self) -> (Vec<Msg>, Status)
where
Msg: Equivalence, { ... } fn immediate_receive_into_with_tag<'a, Sc, Buf: ?Sized>(
&self,
scope: Sc,
buf: &'a mut Buf,
tag: Tag
) -> Request<'a, Sc>
where
Buf: 'a + BufferMut,
Sc: Scope<'a>, { ... } fn immediate_receive_into<'a, Sc, Buf: ?Sized>(
&self,
scope: Sc,
buf: &'a mut Buf
) -> Request<'a, Sc>
where
Buf: 'a + BufferMut,
Sc: Scope<'a>, { ... } fn immediate_receive_with_tag<Msg>(&self, tag: Tag) -> ReceiveFuture<Msg>
where
Msg: Equivalence, { ... } fn immediate_receive<Msg>(&self) -> ReceiveFuture<Msg>
where
Msg: Equivalence, { ... } fn immediate_probe_with_tag(&self, tag: Tag) -> Option<Status> { ... } fn immediate_probe(&self) -> Option<Status> { ... } fn immediate_matched_probe_with_tag(
&self,
tag: Tag
) -> Option<(Message, Status)> { ... } fn immediate_matched_probe(&self) -> Option<(Message, Status)> { ... } }
Something that can be used as the source in a point to point receive operation
Examples
- A
Process
used as a source for a receive operation will receive data only from the identified process. - A communicator can also be used as a source via the
AnyProcess
identifier.
Standard section(s)
3.2.3
Required Methods
fn source_rank(&self) -> Rank
Rank
that identifies the source
Provided Methods
fn probe_with_tag(&self, tag: Tag) -> Status
Probe a source for incoming messages.
Probe Source
&self
for incoming messages with a certain tag.
An ordinary probe()
returns a Status
which allows inspection of the properties of the
incoming message, but does not guarantee reception by a subsequent receive()
(especially
in a multi-threaded set-up). For a probe operation with stronger guarantees, see
matched_probe()
.
Standard section(s)
3.8.1
fn probe(&self) -> Status
Probe a source for incoming messages.
Probe Source
&self
for incoming messages with any tag.
An ordinary probe()
returns a Status
which allows inspection of the properties of the
incoming message, but does not guarantee reception by a subsequent receive()
(especially
in a multi-threaded set-up). For a probe operation with stronger guarantees, see
matched_probe()
.
Standard section(s)
3.8.1
fn matched_probe_with_tag(&self, tag: Tag) -> (Message, Status)
Probe a source for incoming messages with guaranteed reception.
Probe Source
&self
for incoming messages with a certain tag.
A matched_probe()
returns both a Status
that describes the properties of a pending
incoming message and a Message
which can and must subsequently be used in a
matched_receive()
to receive the probed message.
Standard section(s)
3.8.2
fn matched_probe(&self) -> (Message, Status)
Probe a source for incoming messages with guaranteed reception.
Probe Source
&self
for incoming messages with any tag.
A matched_probe()
returns both a Status
that describes the properties of a pending
incoming message and a Message
which can and must subsequently be used in a
matched_receive()
to receive the probed message.
Standard section(s)
3.8.2
fn receive_with_tag<Msg>(&self, tag: Tag) -> (Msg, Status) where
Msg: Equivalence,
Msg: Equivalence,
Receive a message containing a single instance of type Msg
.
Receive a message from Source
&self
tagged tag
containing a single instance of type
Msg
.
Standard section(s)
3.2.4
fn receive<Msg>(&self) -> (Msg, Status) where
Msg: Equivalence,
Msg: Equivalence,
Receive a message containing a single instance of type Msg
.
Receive a message from Source
&self
containing a single instance of type Msg
.
Examples
use mpi::traits::*; let universe = mpi::initialize().unwrap(); let world = universe.world(); let x = world.any_process().receive::<f64>();
Standard section(s)
3.2.4
fn receive_into_with_tag<Buf: ?Sized>(&self, buf: &mut Buf, tag: Tag) -> Status where
Buf: BufferMut,
Buf: BufferMut,
Receive a message into a Buffer
.
Receive a message from Source
&self
tagged tag
into Buffer
buf
.
Standard section(s)
3.2.4
fn receive_into<Buf: ?Sized>(&self, buf: &mut Buf) -> Status where
Buf: BufferMut,
Buf: BufferMut,
Receive a message into a Buffer
.
Receive a message from Source
&self
into Buffer
buf
.
Standard section(s)
3.2.4
fn receive_vec_with_tag<Msg>(&self, tag: Tag) -> (Vec<Msg>, Status) where
Msg: Equivalence,
Msg: Equivalence,
Receive a message containing multiple instances of type Msg
into a Vec
.
Receive a message from Source
&self
tagged tag
containing multiple instances of type
Msg
into a Vec
.
Standard section(s)
3.2.4
fn receive_vec<Msg>(&self) -> (Vec<Msg>, Status) where
Msg: Equivalence,
Msg: Equivalence,
Receive a message containing multiple instances of type Msg
into a Vec
.
Receive a message from Source
&self
containing multiple instances of type Msg
into a
Vec
.
Examples
See examples/send_receive.rs
Standard section(s)
3.2.4
fn immediate_receive_into_with_tag<'a, Sc, Buf: ?Sized>(
&self,
scope: Sc,
buf: &'a mut Buf,
tag: Tag
) -> Request<'a, Sc> where
Buf: 'a + BufferMut,
Sc: Scope<'a>,
&self,
scope: Sc,
buf: &'a mut Buf,
tag: Tag
) -> Request<'a, Sc> where
Buf: 'a + BufferMut,
Sc: Scope<'a>,
Initiate an immediate (non-blocking) receive operation.
Initiate receiving a message matching tag
into buf
.
Standard section(s)
3.7.2
fn immediate_receive_into<'a, Sc, Buf: ?Sized>(
&self,
scope: Sc,
buf: &'a mut Buf
) -> Request<'a, Sc> where
Buf: 'a + BufferMut,
Sc: Scope<'a>,
&self,
scope: Sc,
buf: &'a mut Buf
) -> Request<'a, Sc> where
Buf: 'a + BufferMut,
Sc: Scope<'a>,
Initiate an immediate (non-blocking) receive operation.
Initiate receiving a message into buf
.
Examples
See examples/immediate.rs
Standard section(s)
3.7.2
fn immediate_receive_with_tag<Msg>(&self, tag: Tag) -> ReceiveFuture<Msg> where
Msg: Equivalence,
Msg: Equivalence,
fn immediate_receive<Msg>(&self) -> ReceiveFuture<Msg> where
Msg: Equivalence,
Msg: Equivalence,
Initiate a non-blocking receive operation.
Examples
See examples/immediate.rs
Standard section(s)
3.7.2
fn immediate_probe_with_tag(&self, tag: Tag) -> Option<Status>
Asynchronously probe a source for incoming messages.
Asynchronously probe Source
&self
for incoming messages with a certain tag.
Like Probe
but returns a None
immediately if there is no incoming message to be probed.
Standard section(s)
3.8.1
fn immediate_probe(&self) -> Option<Status>
Asynchronously probe a source for incoming messages.
Asynchronously probe Source
&self
for incoming messages with any tag.
Like Probe
but returns a None
immediately if there is no incoming message to be probed.
Standard section(s)
3.8.1
fn immediate_matched_probe_with_tag(
&self,
tag: Tag
) -> Option<(Message, Status)>
&self,
tag: Tag
) -> Option<(Message, Status)>
Asynchronously probe a source for incoming messages with guaranteed reception.
Asynchronously probe Source
&self
for incoming messages with a certain tag.
Like MatchedProbe
but returns a None
immediately if there is no incoming message to be
probed.
Standard section(s)
3.8.2
fn immediate_matched_probe(&self) -> Option<(Message, Status)>
Asynchronously probe a source for incoming messages with guaranteed reception.
Asynchronously probe Source
&self
for incoming messages with any tag.
Like MatchedProbe
but returns a None
immediately if there is no incoming message to be
probed.
Standard section(s)
3.8.2
Implementors
impl<'a, C> Source for AnyProcess<'a, C> where
C: 'a + Communicator,impl<'a, C> Source for Process<'a, C> where
C: 'a + Communicator,