Struct mpi::request::RequestCollection
source · pub struct RequestCollection<'a, D: ?Sized> { /* private fields */ }
Expand description
Request collection for managing multiple requests at the same time.
Implementations§
source§impl<'a, D: ?Sized> RequestCollection<'a, D>
impl<'a, D: ?Sized> RequestCollection<'a, D>
sourcepub fn incomplete(&self) -> usize
pub fn incomplete(&self) -> usize
Return the total number of requests that are incomplete.
sourcepub fn add<S>(&mut self, req: Request<'a, D, S>) -> usizewhere
S: Scope<'a>,
pub fn add<S>(&mut self, req: Request<'a, D, S>) -> usizewhere
S: Scope<'a>,
Add the request to the collection. This unregisters the request from the scope. The collection then ensures that the request has completed.
sourcepub fn wait_any(&mut self) -> Option<(usize, Status, &'a D)>
pub fn wait_any(&mut self) -> Option<(usize, Status, &'a D)>
Wait for any request to complete, and return an option containing (request_index, status, saved_data).
sourcepub fn wait_some(&mut self, result: &mut Vec<(usize, Status, &'a D)>)
pub fn wait_some(&mut self, result: &mut Vec<(usize, Status, &'a D)>)
Wait for some of the requests to complete, fill result with references to the (request_index, status, saved_data) for each completed request and return the total number of completed requests.
sourcepub fn wait_all(&mut self, result: &mut Vec<(usize, Status, &'a D)>)
pub fn wait_all(&mut self, result: &mut Vec<(usize, Status, &'a D)>)
Wait for all requests to complete, putting (request_index, status, saved_data) into result for every completed request.
sourcepub fn test_any(&mut self) -> Option<(usize, Status, &'a D)>
pub fn test_any(&mut self) -> Option<(usize, Status, &'a D)>
Test for the completion of any requests. Returns an option containing (request_index, status, saved_data).