00001 #ifndef DISTRIBUTEDSIMENGINE_H_
00002 #define DISTRIBUTEDSIMENGINE_H_
00003
00004 #include "SimParameter.h"
00005 #include "SimEngine.h"
00006 #include "DistributedIncomingSpikeScheduler.h"
00007 #include "MPIAllToAllCommunicator.h"
00008 #include "DistributedCycledAnalogMsgDispatcher.h"
00009
00010 class SimNetwork;
00011
00013
00024 class DistributedSimEngine : public SimEngine
00025 {
00026 public:
00027
00029
00038 DistributedSimEngine(SimEngine &localEngine,
00039 DistributedIncomingSpikeScheduler &incomingScheduler,
00040 SpikeScheduler &spikeScheduler,
00041 DistributedCycledAnalogMsgDispatcher &distCycledAnalogMsgDispatcher,
00042 MPIAllToAllCommunicator &mpiCommunicator,
00043 SimNetwork &net);
00044
00045
00046 virtual ~DistributedSimEngine();
00047
00049
00050 virtual void advance(int numSteps =1);
00052 virtual void advanceOneFullCycle();
00053
00054 virtual void advanceSeveralStepsWithinACycle(int nsteps);
00055
00056 virtual void finalizeCycle();
00057
00059 virtual void reset();
00060
00062 virtual void addObject( SimObjectFactory const& objFactory, SimObject::ID &id );
00063
00064 virtual void mount( const SimObjectFactory &objFactory, const SimObject::ID &mountpoint, SimObject::ID &gid );
00065 virtual void insert( const SimObjectFactory &objFactory, const SimObject::ID &mountpoint, SimObject::ID &gid );
00066
00068 virtual SimObject *getObject(const SimObject::ID &id);
00069
00070 virtual void initialize();
00071
00072
00073 virtual void seed( vector<uint32> const& noiseSeed ){};
00074 virtual void seed( uint32 noiseSeed ){};
00075
00076
00077 protected:
00078
00080
00084 SimEngine &localEng;
00085
00087 DistributedIncomingSpikeScheduler &inScheduler;
00088
00090 MPIAllToAllCommunicator & _mpiCommunicator;
00091
00093 DistributedCycledAnalogMsgDispatcher &distCycledAnalogMsgDispatcher;
00094
00095
00096 int currentStepWithinCycle;
00097 };
00098
00099 #endif
00100
00101