Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
Tpetra::Details::Impl::DeferredActionCommRequest Class Reference

Part of the Work-around for not having MPI >= 3. More...

#include <Tpetra_Details_iallreduce.hpp>

Inheritance diagram for Tpetra::Details::Impl::DeferredActionCommRequest:
Inheritance graph
[legend]

Public Member Functions

 DeferredActionCommRequest ()
 Default constructor (take no action on wait). More...
 
 DeferredActionCommRequest (std::function< void() > action)
 Constructor that takes an action to defer. More...
 
void wait ()
 Wait on this communication request to complete. More...
 
void cancel ()
 Cancel the pending communication request, without taking the specified action. More...
 

Detailed Description

Part of the Work-around for not having MPI >= 3.

Substitute for MPI_Iallreduce (which requires MPI 3): defer calling MPI_Allreduce until wait. It's ugly, but it works.

Definition at line 169 of file Tpetra_Details_iallreduce.hpp.

Constructor & Destructor Documentation

Tpetra::Details::Impl::DeferredActionCommRequest::DeferredActionCommRequest ( )

Default constructor (take no action on wait).

Definition at line 177 of file Tpetra_Details_iallreduce.cpp.

Tpetra::Details::Impl::DeferredActionCommRequest::DeferredActionCommRequest ( std::function< void() >  action)

Constructor that takes an action to defer.

action [in] An action to take on wait().

We only take that action the first time you call wait(). This means that wait() is idempotent.

Definition at line 183 of file Tpetra_Details_iallreduce.cpp.

Member Function Documentation

void Tpetra::Details::Impl::DeferredActionCommRequest::wait ( )
virtual

Wait on this communication request to complete.

Implements Tpetra::Details::CommRequest.

Definition at line 190 of file Tpetra_Details_iallreduce.cpp.

void Tpetra::Details::Impl::DeferredActionCommRequest::cancel ( )
virtual

Cancel the pending communication request, without taking the specified action.

Subsequent calls to wait() do nothing.

Implements Tpetra::Details::CommRequest.

Definition at line 200 of file Tpetra_Details_iallreduce.cpp.


The documentation for this class was generated from the following files: