WARPXM v1.10.0
Loading...
Searching...
No Matches
synchronizer.h
Go to the documentation of this file.
1#ifndef WXM_DFEM_SYNC_SYNCHRONIZER_T_H
2#define WXM_DFEM_SYNC_SYNCHRONIZER_T_H
3
4// Wm includes
8#include "sync/synchronizer.h"
11
12// Wx includes
13#include "lib/wxmsgbase.h"
14
15namespace wxm
16{
17namespace dfem
18{
19namespace sync
20{
21
23{
24public:
29 patch_synchronizer_t(const WmUnstructuredPatch& patch, const int tag_seed);
30
33
45 const int component_index)
46 {
48 dynamic_cast<wxm::dfem::variable::distributed_variable_t&>(variable),
49 component_index);
50 }
51
55 void sync();
56
61 void sync_nb();
62
68
69protected:
79 const int component_index);
80
84 void finalize();
85
88
91
94};
95
97{
98public:
104
107
117 const int component_index)
118 {
120 dynamic_cast<wxm::dfem::variable::distributed_variable_t&>(variable),
121 component_index);
122 }
123
127 void sync();
128
133 void sync_nb();
134
140
141protected:
151 const int component_index);
152
156 void finalize();
157
160
163
166};
167
168} // namespace sync
169} // namespace dfem
170} // namespace wxm
171
172#endif // SYNCHRONIZER_T_H
Definition: wmdomain.h:35
Definition: wmunstructuredpatch.h:22
Definition: synchronizer.h:23
void sync()
Blocking sync call.
void sync_nb()
Non-blocking sync call Initiates the recv buffer and sends remote data out.
void add_component(wxm::dfem::variable::distributed_variable_t &variable, const int component_index)
Add a component to the synchronization.
tools::patch_exchanges_t _send_transfers
Send transfers.
Definition: synchronizer.h:90
bool _finalized
Is the class finalized - if not then I can't add new variables.
Definition: synchronizer.h:87
tools::patch_exchanges_t _recv_transfers
Recv transfers.
Definition: synchronizer.h:93
void finalize()
Finalizes the synchronization.
void add_component(wxm::variable::distributed_variable_t &variable, const int component_index)
Add a component to the synchronization.
Definition: synchronizer.h:44
patch_synchronizer_t(const WmUnstructuredPatch &patch, const int tag_seed)
Constructor.
void sync_nb_wait()
Blocking sync wait call Transmits local data, and waits until remote recv is complete.
virtual ~patch_synchronizer_t()
Destructor.
Definition: synchronizer.h:97
bool _finalized
Is the class finalized - if not then I can't add new variables.
Definition: synchronizer.h:159
tools::rank_exchanges_t _send_transfers
Send transfers.
Definition: synchronizer.h:162
void add_component(wxm::variable::distributed_variable_t &variable, const int component_index)
Add a component to the synchronization.
Definition: synchronizer.h:116
void sync_nb_wait()
Blocking sync wait call Transmits local data, and waits until remote recv is complete.
void add_component(wxm::dfem::variable::distributed_variable_t &variable, const int component_index)
Add a component to the synchronization.
void finalize()
Finalizes the syncrhonization.
void sync()
Blocking sync call.
tools::rank_exchanges_t _recv_transfers
Recv transfers.
Definition: synchronizer.h:165
void sync_nb()
Non-blocking sync call Initiates the recv buffer and sends remote data out.
rank_synchronizer_t(const WmDomain &domain)
Constructor.
Definition: distributed_variable.h:101
Definition: synchronizer.h:15
Definition: synchronizer.h:68
Defines an interface for variables that exits over distributed memory.
Definition: distributed_variable.h:28
std::vector< rank_exchange_t * > rank_exchanges_t
Definition: exchange.h:337
std::vector< patch_exchange_t * > patch_exchanges_t
Definition: exchange.h:431
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8