diff options
author | Erik Schnetter <schnetter@aei.mpg.de> | 2005-01-02 17:35:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@aei.mpg.de> | 2005-01-02 17:35:00 +0000 |
commit | 103155822be34d975e307666930595c53a3a9f3c (patch) | |
tree | 3d77bfcab9cb51f5de0911f3c8dba6940778264a /Carpet/CarpetLib/src/commstate.hh | |
parent | a9e01192b2b3064c7fa4d3330ea3a68c3c69b80e (diff) |
CarpetLib: Add lightweight communication buffers (untested)
Lightweight communication buffers use essentially only a vector<T>
instead of a data<T> to transfer data between processors. This should
reduce the computational overhead.
Set the parameter "use_lightweight_buffers" to use this feature. This
feature is completely untested.
darcs-hash:20050102173524-891bb-6a3999cbd63e367c8520c175c8078374d294eaa8.gz
Diffstat (limited to 'Carpet/CarpetLib/src/commstate.hh')
-rw-r--r-- | Carpet/CarpetLib/src/commstate.hh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/commstate.hh b/Carpet/CarpetLib/src/commstate.hh index 340d09ded..5a9570c7c 100644 --- a/Carpet/CarpetLib/src/commstate.hh +++ b/Carpet/CarpetLib/src/commstate.hh @@ -30,10 +30,25 @@ private: // Forbid copying and passing by value comm_state (comm_state const &); comm_state& operator= (comm_state const &); + public: + // Lists of temporary data objects queue<gdata*> tmps1, tmps2; - vector<MPI_Request> requests; // for use_waitall + + // List of MPI requests for use_waitall + vector<MPI_Request> requests; + + // Lists of communication buffers for use_lightweight_buffers + struct gcommbuf { + bool am_receiver, am_sender; + MPI_Request request; + }; + template<typename T> + struct commbuf : gcommbuf { + vector<T> data; + }; + queue<gcommbuf*> recvbufs, sendbufs; }; |