Newer
Older
#ifndef PTHREAD_SIMULATION_HPP
#define PTHREAD_SIMULATION_HPP
#include <vector>
#include <pthread.h>
namespace nbody {
class PthreadSimulation {
protected:
int correctState;
vector<Body> bodies;
BarnesHutTree tree;
vector<pthread_t> threads;
public:
PthreadSimulation();
virtual ~PthreadSimulation();
virtual void cleanup() = 0;
virtual int getNumberOfProcesses() = 0;
virtual int getProcessId() = 0;
virtual bool readInputData(string filename) = 0;
virtual void runStep() = 0;
};
}
#endif