
#include "receiver.h"

#include "pingpong.decl.h"

class DataMsg : public CMessage_DataMsg {
public:
  int fromLeft;
  int size;
  double b[200]; // border up to 200 elements can be sent. use varsize later.
};


class main : public Chare
{
private:
  CkArrayID A;

public:
  main(CkMigrateMessage *m) {}
  main(CkArgMsg *m);
  void allDone(CkQdMsg *);
};

class pingpong: public receiver 
{
private:
  int iterations;
  CellData *data;
  void sendToNeighbors();

  int bufsize;
  char *buf1, *buf2;

public:
   pingpong();
   pingpong(CkMigrateMessage *m) {}
   void pup(PUP::er &p);
//   void borderValues(); 
   void resumeFromWait();
};

