The rank_exchange_t class is used to exchange sets of components existing between sets of patches on different ranks.
More...
#include <exchange.h>
The rank_exchange_t class is used to exchange sets of components existing between sets of patches on different ranks.
|
| rank_exchange_t (const WmDomain &domain, int from_rank, int to_rank) |
| Construct the rank exchange given a from_rank and a to_rank (defines links)
|
|
| ~rank_exchange_t () |
| Destructor.
|
|
size_t | size () |
| Used to define the size of the range.
|
|
void | add_component (wxm::dfem::variable::distributed_variable_t &variable, const int component_index) |
| Adds a variable's component to the exchange.
|
|
void | send () |
| Sends data from the from_rank to the to_rank.
|
|
void | recv_init () |
| Receives data from the to_rank.
|
|
void | recv_wait () |
| Waits for the data to be transmitted from the from_rank to the to_rank.
|
|
void | send_init () |
| Sends data from the from_rank.
|
|
void | send_wait () |
| Waits for the data to be transmitted from the to_rank to the from_rank.
|
|
| sync_chunk_t () |
|
virtual | ~sync_chunk_t () |
|
virtual size_t | size () |
| Size of patch exchange chunk.
|
|
virtual void | read (const real *from_data) |
| Read patch exchange data from pointer.
|
|
virtual void | write (real *to_data, size_t buf_size) |
| Write patch exchange chunk to pointer.
|
|
◆ rank_exchange_t()
wxm::dfem::sync::tools::rank_exchange_t::rank_exchange_t |
( |
const WmDomain & |
domain, |
|
|
int |
from_rank, |
|
|
int |
to_rank |
|
) |
| |
Construct the rank exchange given a from_rank and a to_rank (defines links)
- Parameters
-
domain | Domain object |
from_rank | Rank that exchange will pull from |
to_rank | Rank that exchange will push to |
◆ ~rank_exchange_t()
wxm::dfem::sync::tools::rank_exchange_t::~rank_exchange_t |
( |
| ) |
|
◆ add_component()
Adds a variable's component to the exchange.
- Parameters
-
variable | Variable that owns the component |
component_index | Component of variable to sync |
◆ recv_init()
void wxm::dfem::sync::tools::rank_exchange_t::recv_init |
( |
| ) |
|
Receives data from the to_rank.
This is non blocking, and a call to recv_wait is reqired to complete call.
Note: This call will throw an error if to_rank is not local.
◆ recv_wait()
void wxm::dfem::sync::tools::rank_exchange_t::recv_wait |
( |
| ) |
|
Waits for the data to be transmitted from the from_rank to the to_rank.
Note: This call will throw an error if to_rank is not local.
◆ send()
void wxm::dfem::sync::tools::rank_exchange_t::send |
( |
| ) |
|
Sends data from the from_rank to the to_rank.
Note: This call will throw an error if from_rank is not the local rank
◆ send_init()
void wxm::dfem::sync::tools::rank_exchange_t::send_init |
( |
| ) |
|
Sends data from the from_rank.
This is non blocking, and a call to send_wait is reqired to complete call.
Note: This call will throw an error if from_rank is not local.
◆ send_wait()
void wxm::dfem::sync::tools::rank_exchange_t::send_wait |
( |
| ) |
|
Waits for the data to be transmitted from the to_rank to the from_rank.
Note: This call will throw an error if from_rank is not local.
◆ size()
size_t wxm::dfem::sync::tools::rank_exchange_t::size |
( |
| ) |
|
|
virtual |
Used to define the size of the range.
Also allocates the buffer allocation.
- Returns
- Number of 'real's that make up buffer allocation
Reimplemented from wxm::dfem::sync::tools::sync_chunk_t.
◆ _buffer_allocation
std::vector<real> wxm::dfem::sync::tools::rank_exchange_t::_buffer_allocation |
|
protected |
Buffer allocation used for storing data for sync operation.
◆ _domain
const WmDomain& wxm::dfem::sync::tools::rank_exchange_t::_domain |
|
protected |
Reference to domain object.
◆ _from_rank
int wxm::dfem::sync::tools::rank_exchange_t::_from_rank |
|
protected |
◆ _msg
const WxMsgBase& wxm::dfem::sync::tools::rank_exchange_t::_msg |
|
protected |
◆ _msg_tag
int wxm::dfem::sync::tools::rank_exchange_t::_msg_tag |
|
protected |
Unique tag for msg messages.
◆ _sync_links
sync_links_t wxm::dfem::sync::tools::rank_exchange_t::_sync_links |
|
protected |
List of links assoicated with inter-rank connections.
◆ _to_rank
int wxm::dfem::sync::tools::rank_exchange_t::_to_rank |
|
protected |
◆ recv_status
WxMsgStatus wxm::dfem::sync::tools::rank_exchange_t::recv_status = nullptr |
|
protected |
Msg status object used to know when recv has completed.
◆ send_status
WxMsgStatus wxm::dfem::sync::tools::rank_exchange_t::send_status = nullptr |
|
protected |
Msg status object used to know when send has completed.
The documentation for this class was generated from the following file: