aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/gdata.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib/src/gdata.cc')
-rw-r--r--Carpet/CarpetLib/src/gdata.cc68
1 files changed, 1 insertions, 67 deletions
diff --git a/Carpet/CarpetLib/src/gdata.cc b/Carpet/CarpetLib/src/gdata.cc
index 2a921807c..55f1ce197 100644
--- a/Carpet/CarpetLib/src/gdata.cc
+++ b/Carpet/CarpetLib/src/gdata.cc
@@ -9,6 +9,7 @@
#include "util_Table.h"
#include "bbox.hh"
+#include "commstate.hh"
#include "defs.hh"
#include "dist.hh"
#include "vect.hh"
@@ -19,73 +20,6 @@ using namespace std;
-// Communication state control
-comm_state::comm_state ()
- : thestate(state_recv)
-{
-}
-
-void comm_state::step ()
-{
- DECLARE_CCTK_PARAMETERS;
-
- assert (thestate!=state_done);
- if (combine_recv_send) {
- switch (thestate) {
- case state_recv:
- assert (tmps1.empty());
- thestate = state_wait;
- break;
- case state_send:
- assert (0);
- case state_wait:
- assert (tmps1.empty());
- assert (tmps2.empty());
- thestate = state_done;
- break;
- case state_done:
- assert (0);
- default:
- assert (0);
- }
- } else {
- switch (thestate) {
- case state_recv:
- assert (tmps2.empty());
- thestate = state_send;
- break;
- case state_send:
- assert (tmps1.empty());
- thestate = state_wait;
- break;
- case state_wait:
- assert (tmps1.empty());
- assert (tmps2.empty());
- thestate = state_done;
- break;
- case state_done:
- assert (0);
- default:
- assert (0);
- }
- }
-}
-
-bool comm_state::done ()
-{
- return thestate==state_done;
-}
-
-comm_state::~comm_state ()
-{
- assert (thestate==state_recv || thestate==state_done);
- assert (tmps1.empty());
- assert (tmps2.empty());
- assert (requests.empty());
-}
-
-
-
// Hand out the next MPI tag
static int nexttag ()
{