Reference documentation for deal.II version Git d902c8c1aa 2019-12-15 00:36:45 -0500
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Private Attributes | List of all members
Utilities::MPI::ConsensusAlgorithmProcessTargets Class Reference
Inheritance diagram for Utilities::MPI::ConsensusAlgorithmProcessTargets:
[legend]

Public Member Functions

virtual void process_request (const unsigned int other_rank, const std::vector< T1 > &, std::vector< T2 > &) override
 
virtual std::vector< unsigned int > compute_targets () override
 
std::vector< unsigned int > get_result ()
 
- Public Member Functions inherited from Utilities::MPI::ConsensusAlgorithmProcess< int, int >
virtual ~ConsensusAlgorithmProcess ()=default
 
virtual void pack_recv_buffer (const int other_rank, std::vector< int > &send_buffer)
 
virtual void prepare_recv_buffer (const int other_rank, std::vector< int > &recv_buffer)
 
virtual void unpack_recv_buffer (const int other_rank, const std::vector< int > &recv_buffer)
 

Private Attributes

const std::vector< unsigned int > & target
 
std::vector< unsigned int > sources
 

Detailed Description

A re-implementation of compute_point_to_point_communication_pattern using the ConsensusAlgorithm.

Definition at line 227 of file mpi.cc.

Member Function Documentation

◆ process_request()

virtual void Utilities::MPI::ConsensusAlgorithmProcessTargets::process_request ( const unsigned int  other_rank,
const std::vector< T1 > &  buffer_recv,
std::vector< T2 > &  request_buffer 
)
inlineoverridevirtual

Prepare the buffer where the payload of the answer of the request to the process with the specified rank is saved in.

Parameters
[in]other_rankrank of the process
[in]buffer_recvreceived payload (optional)
[out]request_bufferpayload to be sent as part of the request (optional)
Note
The request_buffer is empty. Before using it, you have to set its size.

Reimplemented from Utilities::MPI::ConsensusAlgorithmProcess< int, int >.

Definition at line 239 of file mpi.cc.

◆ compute_targets()

virtual std::vector<unsigned int> Utilities::MPI::ConsensusAlgorithmProcessTargets::compute_targets ( )
inlineoverridevirtual

Simply return the user-provided list.

Returns
List of processes this process wants to send requests to.

Implements Utilities::MPI::ConsensusAlgorithmProcess< int, int >.

Definition at line 252 of file mpi.cc.

◆ get_result()

std::vector<unsigned int> Utilities::MPI::ConsensusAlgorithmProcessTargets::get_result ( )
inline

The result of the consensus algorithm.

Returns
Sorted list of ranks of processes wanting to send a request to this process.

Definition at line 263 of file mpi.cc.

Member Data Documentation

◆ target

const std::vector<unsigned int>& Utilities::MPI::ConsensusAlgorithmProcessTargets::target
private

List of processes this process wants to send requests to.

Definition at line 273 of file mpi.cc.

◆ sources

std::vector<unsigned int> Utilities::MPI::ConsensusAlgorithmProcessTargets::sources
private

List of ranks of processes wanting to send a request to this process.

Definition at line 278 of file mpi.cc.


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