Reference documentation for deal.II version 9.5.0
|
#include <deal.II/base/mpi_consensus_algorithms.h>
Public Member Functions | |
AnonymousProcess (const std::function< std::vector< unsigned int >()> &function_compute_targets, const std::function< void(const unsigned int, RequestType &)> &function_create_request={}, const std::function< void(const unsigned int, const RequestType &, AnswerType &)> &function_answer_request={}, const std::function< void(const unsigned int, const AnswerType &)> &function_read_answer={}) | |
std::vector< unsigned int > | compute_targets () override |
void | create_request (const unsigned int other_rank, RequestType &send_buffer) override |
void | answer_request (const unsigned int other_rank, const RequestType &buffer_recv, AnswerType &request_buffer) override |
void | read_answer (const unsigned int other_rank, const AnswerType &recv_buffer) override |
Private Attributes | |
const std::function< std::vector< unsigned int >()> | function_compute_targets |
const std::function< void(const int, RequestType &)> | function_create_request |
const std::function< void(const unsigned int, const RequestType &, AnswerType &)> | function_answer_request |
const std::function< void(const int, const AnswerType &)> | function_read_answer |
This class implements Utilities::MPI::ConsensusAlgorithms::Process, using user-provided function wrappers. The advantage of this class is that users do not have to write their own implementation but can register lambda functions directly.
Definition at line 1159 of file mpi_consensus_algorithms.h.
Utilities::MPI::ConsensusAlgorithms::AnonymousProcess< RequestType, AnswerType >::AnonymousProcess | ( | const std::function< std::vector< unsigned int >()> & | function_compute_targets, |
const std::function< void(const unsigned int, RequestType &)> & | function_create_request = {} , |
||
const std::function< void(const unsigned int, const RequestType &, AnswerType &)> & | function_answer_request = {} , |
||
const std::function< void(const unsigned int, const AnswerType &)> & | function_read_answer = {} |
||
) |
Register functions that should be called for implementing the interface of Process.
function_compute_targets | called during compute_targets . |
function_create_request | called during create_request . |
function_answer_request | called during answer_request . |
function_read_answer | called during read_answer . |
|
overridevirtual |
Implements Utilities::MPI::ConsensusAlgorithms::Process< RequestType, AnswerType >.
|
overridevirtual |
Add a payload to the request to the process with the specified rank.
[in] | other_rank | Rank of the process. |
[out] | send_buffer | data to be sent part of the request (optional). |
Reimplemented from Utilities::MPI::ConsensusAlgorithms::Process< RequestType, AnswerType >.
|
overridevirtual |
Prepare the buffer where the payload of the answer of the request to the process with the specified rank is saved in.
[in] | other_rank | Rank of the process. |
[in] | buffer_recv | Received payload (optional). |
[out] | request_buffer | Payload to be sent as part of the request (optional). |
Reimplemented from Utilities::MPI::ConsensusAlgorithms::Process< RequestType, AnswerType >.
|
overridevirtual |
Process the payload of the answer of the request to the process with the specified rank.
[in] | other_rank | rank of the process |
[in] | recv_buffer | data to be sent part of the request (optional) |
Reimplemented from Utilities::MPI::ConsensusAlgorithms::Process< RequestType, AnswerType >.
|
private |
Definition at line 1213 of file mpi_consensus_algorithms.h.
|
private |
Definition at line 1215 of file mpi_consensus_algorithms.h.
|
private |
Definition at line 1218 of file mpi_consensus_algorithms.h.
|
private |
Definition at line 1220 of file mpi_consensus_algorithms.h.