Example charm++/matmul: simplify logic for when to pass blocks
[charm.git] / examples / charm++ / Molecular2D / Compute.h
1 /** \file Compute.h
2  *  Author: Abhinav S Bhatele
3  *  Date Created: July 1st, 2008
4  *
5  */
6
7 #ifndef __COMPUTE_H__
8 #define __COMPUTE_H__
9
10 #include "common.h"
11
12 // Class representing the interaction agents between a couple of cells
13 class Compute : public CBase_Compute {
14   private:
15     int cellCount;  // to count the number of interact() calls
16     CkVec<Particle> bufferedParticles;
17     int bufferedX;
18     int bufferedY;
19
20     void interact(CkVec<Particle> &first, CkVec<Particle> &second);
21     void interact(Particle &first, Particle &second);
22
23   public:
24     Compute();
25     Compute(CkMigrateMessage *msg);
26
27     void interact(CkVec<Particle> particles, int i, int j);
28
29 };
30
31 #endif