WARPXM v1.10.0
Loading...
Searching...
No Matches
synchronizer.h
Go to the documentation of this file.
1#ifndef WXM_SYNC_SYNCHRONIZER_T_H
2#define WXM_SYNC_SYNCHRONIZER_T_H
3
4// Wm includes
7#include "variable/distributed_variable.h"
8
9namespace wxm
10{
11namespace sync
12{
13
15{
16public:
21 patch_synchronizer_t(const WmUnstructuredPatch& patch, const int tag_seed)
22 : _patch(patch), _tag_seed(tag_seed)
23 {
24 }
25
28 {
29 }
30
40 const int component_index) = 0;
41
45 virtual void sync() = 0;
46
51 virtual void sync_nb() = 0;
52
57 virtual void sync_nb_wait() = 0;
58
59protected:
62
65};
66
68{
69public:
74 rank_synchronizer_t(const WmDomain& domain) : _domain(domain)
75 {
76 }
77
80 {
81 }
82
92 const int component_index) = 0;
93
97 virtual void sync() = 0;
98
103 virtual void sync_nb() = 0;
104
109 virtual void sync_nb_wait() = 0;
110
111protected:
114};
115
116} // namespace sync
117} // namespace wxm
118
119#endif // SYNCHRONIZER_T_H
Definition: wmdomain.h:35
Definition: wmunstructuredpatch.h:22
Definition: synchronizer.h:15
int _tag_seed
Tag seed - used to generate shared tags.
Definition: synchronizer.h:64
virtual void sync_nb()=0
Non-blocking sync call Initiates the recv buffer and sends remote data out.
virtual ~patch_synchronizer_t()
Destructor.
Definition: synchronizer.h:27
const WmUnstructuredPatch & _patch
Domain object.
Definition: synchronizer.h:61
patch_synchronizer_t(const WmUnstructuredPatch &patch, const int tag_seed)
Constructor.
Definition: synchronizer.h:21
virtual void add_component(wxm::variable::distributed_variable_t &variable, const int component_index)=0
Add a component to the synchronization.
virtual void sync_nb_wait()=0
Blocking sync wait call Transmits local data, and waits until remote recv is complete.
virtual void sync()=0
Blocking sync call.
Definition: synchronizer.h:68
virtual void sync()=0
Blocking sync call.
rank_synchronizer_t(const WmDomain &domain)
Constructor.
Definition: synchronizer.h:74
const WmDomain & _domain
Domain object.
Definition: synchronizer.h:113
virtual void add_component(wxm::variable::distributed_variable_t &variable, const int component_index)=0
Add a component to the synchronization.
virtual void sync_nb()=0
Non-blocking sync call Initiates the recv buffer and sends remote data out.
virtual ~rank_synchronizer_t()
Destructor.
Definition: synchronizer.h:79
virtual void sync_nb_wait()=0
Blocking sync wait call Transmits local data, and waits until remote recv is complete.
Defines an interface for variables that exits over distributed memory.
Definition: distributed_variable.h:28
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8