|
GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
|
Interface for network communication between islands. More...
#include <Communicator.h>
Public Member Functions | |
| virtual | ~Communicator ()=default |
| virtual void | startReceiving (MigrationBuffer< GeneType > &target_buffer)=0 |
| Begins asynchronous background receiving of migrants. | |
| virtual void | update ()=0 |
| Processes any pending network events (e.g. polls for incoming messages). | |
| virtual void | stopReceiving ()=0 |
| Stops background communication activities. | |
| virtual void | send (const std::vector< Individual< GeneType > > &deme, std::size_t destination_rank)=0 |
| Sends a deme to a specific destination island. | |
| virtual void | broadcast (const std::vector< Individual< GeneType > > &deme, const std::vector< std::size_t > &destination_ranks)=0 |
| Sends a deme to multiple destination islands. | |
| virtual Individual< GeneType > | allReduceBest (Individual< GeneType > individual) const =0 |
| Global reduction to find the best individual across all islands. | |
| virtual std::size_t | getRank () const =0 |
| Gets the network rank of the local node. | |
| virtual std::size_t | getSize () const =0 |
| Gets the total number of islands in the network. | |
Interface for network communication between islands.
Handles the low-level details of moving individuals between distributed nodes and synchronizing global state.
| GeneType | The gene type of the individuals. |
Definition at line 22 of file Communicator.h.
|
virtualdefault |
|
pure virtual |
Global reduction to find the best individual across all islands.
| individual | The local best individual. |
Implemented in galib::internal::MpiCommunicator< GeneType >.
|
pure virtual |
Sends a deme to multiple destination islands.
| deme | The individuals to migrate. |
| destination_ranks | List of target island IDs. |
Implemented in galib::internal::MpiCommunicator< GeneType >.
|
pure virtual |
Gets the network rank of the local node.
Implemented in galib::internal::MpiCommunicator< GeneType >.
|
pure virtual |
Gets the total number of islands in the network.
Implemented in galib::internal::MpiCommunicator< GeneType >.
|
pure virtual |
Sends a deme to a specific destination island.
| deme | The individuals to migrate. |
| destination_rank | The network ID/rank of the target island. |
Implemented in galib::internal::MpiCommunicator< GeneType >.
|
pure virtual |
Begins asynchronous background receiving of migrants.
| target_buffer | The buffer where arrived individuals will be stored. |
Implemented in galib::internal::MpiCommunicator< GeneType >.
|
pure virtual |
Stops background communication activities.
Implemented in galib::internal::MpiCommunicator< GeneType >.
|
pure virtual |
Processes any pending network events (e.g. polls for incoming messages).
Implemented in galib::internal::MpiCommunicator< GeneType >.