DistributedSingleThreadNetwork.h

Go to the documentation of this file.
00001 #ifndef DISTRIBUTEDSINGLETHREADNETWORK_H_
00002 #define DISTRIBUTEDSINGLETHREADNETWORK_H_
00003 
00004 #include "DistributedNetwork.h"
00005 #include "DistributedSimEngine.h"
00006 #include "SingleThreadSimEngine.h"
00007 #include "STDistributedIncomingSpikeScheduler.h"
00008 #include "DistributedSpikeScheduler.h"
00009 #include "SingleThreadSpikeScheduler.h"
00010 #include "GlobalSingleTargetDelayMap.h"
00011 #include "TargetNodesMap.h"
00012 
00013 #include "MPIDefaultAllToAllCommunicator.h"
00014 #include "MPIInputBuffer.h"
00015 #include "MPIOutputBuffer.h"
00016 #include "AnalogMessageDispatcher.h"
00017 
00018 #ifndef __GCCXML__
00019 #include "DistributedAnalogMessageDispatcher.h"
00020 #include "DistributedAnalogMessageCreator.h"
00021 #include "AnalogDelayObjectMap.h"
00022 #include "STAnalogMessageCreator.h"
00023 #endif
00024 
00026 
00034 class DistributedSingleThreadNetwork : public DistributedNetwork {
00035     public:
00036 
00038         DistributedSingleThreadNetwork( SimParameter sp = SimParameter::Default);
00039 
00040 
00042 
00051         DistributedSingleThreadNetwork( MPI::Intracomm &mpiCommunicator, SimParameter sp = SimParameter::Default  );
00052 
00053 
00054 
00055         virtual ~DistributedSingleThreadNetwork();
00056 
00058 
00059 
00061 
00062         // virtual void addSpikeMessage(const SimObject::ID &sender, const port_t out, const SimObject::ID &receiver, const port_t in, const Time &delay);
00063 
00064     public:
00065         virtual void _addAnalogMessage_(const SimObject::ID &sender, int sender_port, const SimObject::ID &receiver, int recv_port, const Time &delay);
00066 
00067         virtual void _addAnalogMessage_(const SimObject::ID &sender, int sender_port, const SimObject::ID &receiver, string destfield, const Time &delay);
00068 
00069         virtual void _addAnalogMessage_(const SimObject::ID &sender, string srcfield, const SimObject::ID &receiver, int recv_port, const Time &delay);
00070 
00071         virtual void _addAnalogMessage_(const SimObject::ID &sender, string srcfield, const SimObject::ID &receiver, string destfield, const Time &delay);
00072 
00073 
00074     protected:
00075         template<typename analogSrcType, typename analogDestType>
00076         void addGenericAnalogMessage(const SimObject::ID &sender, analogSrcType srcPortOrField, const SimObject::ID &receiver, analogDestType destPortOrField, delay_t delay);
00077 
00079 
00080     protected:
00081 
00083 
00087         virtual void _reset_();
00088 
00089 
00091 
00098         virtual void _advance_( int nSteps = 1 );
00099 
00101         virtual void _initialize_();
00102 
00104 
00105         virtual SimObject *_getObject_(const SimObject::ID &id);
00107 
00108         // virtual local_objectid_t addObjectLocally( SimObject *o, engineid_t eng = 0 );
00109 
00111         STDistributedIncomingSpikeScheduler *distIncomingSpikeScheduler;
00112 
00114         DistributedSpikeScheduler *spikeScheduler;
00115 
00116 
00118 
00123         GlobalSingleTargetDelayMap *globalDelayMap;
00124 
00126 
00130         TargetNodesMap *targetNodesMap;
00131 
00133         MPIAllToAllCommunicator *mpiAllToAllComm;
00134 
00136 
00139         MPIOutputBufferVector *mpiOutBuffers;
00140 
00142 
00145         MPIInputBufferVector *mpiInBuffers;
00146 
00148 
00152         PropagatedSpikeBuffer *spikeBuffer;
00153 
00155 
00159         LocalDelayMap *localDelayMap;
00160 
00162         SingleThreadSpikeScheduler *localSpikeScheduler;
00163 
00164 
00166 
00167 #ifndef __GCCXML__
00168 
00169         AnalogMessageDispatcher *localAnalogMsgDispatcher;
00170 
00171         AnalogDelayObjectMap * delayObjectMap;
00172 
00173         DistributedAnalogMessageDispatcher *distAnalogMsgDispatcher;
00174 
00175         STAnalogMessageCreator *localAnalogMsgCreator;
00176 
00177         DistributedAnalogMessageCreator *distAnalogMsgCreator;
00178 
00179         vector< DistributedIncomingAnalogMsgDispatcher *> incomingDispatchers;
00180 
00181         vector<DistIncomingAnalogSources2BufPosMap *> sources2BufPositionsMaps;
00182 
00183         vector< DistributedOutgoingAnalogMsgDispatcher *> outgoingDispatchers;
00184 
00185 #endif
00186 
00187 
00189 
00194         SpikeTargetGroupPool *stgPool;
00195 
00196 
00197 
00198     private:
00199 
00201         void init();
00202 
00203     protected:
00204 
00205         virtual void _addSpikeMessage_(const SimObject::ID &sender, const port_t out, const spike_port_id_t sender_port, const SimObject::ID &receiver, const port_t port, const step_t delay);
00206 
00207 
00208 };
00209 
00210 #endif /*DISTRIBUTEDSINGLETHREADNETWORK_H_*/

Generated on Wed Jul 9 16:34:37 2008 for PCSIM by  doxygen 1.5.5