SingleThreadNetwork Class Reference

Network which can only be run by one thread. More...

#include <SingleThreadNetwork.h>

Inheritance diagram for SingleThreadNetwork:

Inheritance graph
[legend]
Collaboration diagram for SingleThreadNetwork:

Collaboration graph
[legend]

List of all members.

Adding objects

virtual void setDistributionStrategy (const DistributionStrategy::DistributionFunction &df)
 Define the dsitribution strategy.
virtual void _addObject_ (const SimObjectFactory &objFactory, const SimEngine::ID &loc, SimObject::ID &oid)
 One instance of a simulation object is created by the factory and added to the netowrk.
virtual void _addObject_ (const SimObjectFactory &objFactory, SimObject::ID &gid)
 One instance of a simulation object is created and added to the network using the current distribution strategy. The SimObject::quadID is returned.

Public Member Functions

 SingleThreadNetwork (SimParameter sp=SimParameter::Default)
 SingleThreadNetwork (MPI::Intracomm &mpiCommunicator, SimParameter sp=SimParameter::Default)
virtual ~SingleThreadNetwork ()

Protected Member Functions

virtual void _initialize_ ()
virtual void _reset_ ()
virtual void _advance_ (int nSteps=1)
virtual void _insert_ (const SimObjectFactory &objFactory, const SimObject::ID &container, SimObject::ID &gid)
 One instance of a simulation object is "inserted" into the container simulation object. The SimObject::quadID of the newly created object is returned.
virtual void _mount_ (const SimObjectFactory &objFactory, const SimObject::ID &mountpoint, SimObject::ID &gid)
 One instance of a simulation object is "mounted" to the mount simulation object.
virtual void _connect_ (SimObject::ID const &src, port_t out, const SimObject::ID &dst, port_t in, int delay)
 Make a connection (i.e. spike or analog message) from the src-out port to the dest-in port.
virtual void seed_noise_rng (uint32 noiseRNGseed)
Messages
virtual void _addSpikeMessage_ (const SimObject::ID &sender, const port_t out, const SimObject::ID &receiver, const port_t in, const Time &delay)
 Set up a spike message channel with delay in simulation time steps.
virtual void _addAnalogMessage_ (const SimObject::ID &sender, int sender_port, const SimObject::ID &receiver, int recv_port, const Time &delay)
virtual void _addAnalogMessage_ (const SimObject::ID &sender, int sender_port, const SimObject::ID &receiver, string destfield, const Time &delay)
virtual void _addAnalogMessage_ (const SimObject::ID &sender, string srcfield, const SimObject::ID &receiver, int recv_port, const Time &delay)
virtual void _addAnalogMessage_ (const SimObject::ID &sender, string srcfield, const SimObject::ID &receiver, string destfield, const Time &delay)
virtual SimObject_getObject_ (const SimObject::ID &id)
Converting between local and global engine IDs
virtual gl_engineid_t maxLocalEngineID (void) const
 Return the largest global simulation engine ID.

Static Protected Member Functions

static void addLocalSpikeMessage (LocalDelayMap *arg_delayMap, SpikeTargetGroupPool *arg_stgPool, SimEngine *arg_simEng, const spike_port_id_t sender_port, const SimObject::ID &receiver, port_t in_port, step_t delay)

Friends

class MultiThreadNetwork
class DistributedSingleThreadNetwork
class DistributedMultiThreadNetwork


Detailed Description

Network which can only be run by one thread.

Definition at line 24 of file SingleThreadNetwork.h.


Constructor & Destructor Documentation

SingleThreadNetwork::SingleThreadNetwork ( SimParameter  sp = SimParameter::Default  ) 

Definition at line 18 of file SingleThreadNetwork.cpp.

SingleThreadNetwork::SingleThreadNetwork ( MPI::Intracomm &  mpiCommunicator,
SimParameter  sp = SimParameter::Default 
)

Definition at line 24 of file SingleThreadNetwork.cpp.

SingleThreadNetwork::~SingleThreadNetwork (  )  [virtual]

Definition at line 51 of file SingleThreadNetwork.cpp.

References SimNetwork::initialized.


Member Function Documentation

void SingleThreadNetwork::_addObject_ ( const SimObjectFactory objFactory,
const SimEngine::ID loc,
SimObject::ID oid 
) [protected, virtual]

One instance of a simulation object is created by the factory and added to the netowrk.

Parameters:
loc Ignored.
id The resulting unique identifier (node,engine,type,localid) of the created object. id.engine = 0 always holds.

Reimplemented from SimNetwork.

Definition at line 91 of file SingleThreadNetwork.cpp.

References SimNetwork::_mpi_rank, SimNetwork::addObject(), SimEngine::ID::engine, SimObject::ID::Invalid, and SimEngine::ID::node.

Here is the call graph for this function:

virtual void SingleThreadNetwork::setDistributionStrategy ( const DistributionStrategy::DistributionFunction df  )  [inline, virtual]

Define the dsitribution strategy.

Definition at line 48 of file SingleThreadNetwork.h.

void SingleThreadNetwork::_addObject_ ( const SimObjectFactory objFactory,
SimObject::ID gid 
) [protected, virtual]

One instance of a simulation object is created and added to the network using the current distribution strategy. The SimObject::quadID is returned.

Reimplemented from SimNetwork.

Definition at line 105 of file SingleThreadNetwork.cpp.

References SimNetwork::_mpi_rank, SingleThreadSimEngine::addObject(), SimObject::ID::eng, and SimObject::ID::node.

Here is the call graph for this function:

void SingleThreadNetwork::_addSpikeMessage_ ( const SimObject::ID sender,
const port_t  out,
const SimObject::ID receiver,
const port_t  in,
const Time delay 
) [protected, virtual]

Set up a spike message channel with delay in simulation time steps.

Each spike of the sender is sent to the given port of receiver (after delay simulation steps)

Reimplemented from SimNetwork.

Definition at line 163 of file SingleThreadNetwork.cpp.

References SimNetwork::_nSpikeMessages, addLocalSpikeMessage(), SimNetwork::get_dt(), SingleThreadSimEngine::getObject(), SpikeSender::getSpikePort(), SpikeOutputPort::ID(), Time::in_ms(), Time::in_steps(), SimParameter::maxDelay, SimNetwork::simParam, and SimObject::ID::toString().

Here is the call graph for this function:

void SingleThreadNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
int  sender_port,
const SimObject::ID receiver,
int  recv_port,
const Time delay 
) [protected, virtual]

Reimplemented from SimNetwork.

Definition at line 205 of file SingleThreadNetwork.cpp.

References SimNetwork::_nAnalogMessages, STAnalogMessageCreator::addAnalogMessage(), SimNetwork::get_dt(), and Time::in_steps().

Here is the call graph for this function:

void SingleThreadNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
int  sender_port,
const SimObject::ID receiver,
string  destfield,
const Time delay 
) [protected, virtual]

Reimplemented from SimNetwork.

Definition at line 211 of file SingleThreadNetwork.cpp.

References SimNetwork::_nAnalogMessages, STAnalogMessageCreator::addAnalogMessage(), SimNetwork::get_dt(), and Time::in_steps().

Here is the call graph for this function:

void SingleThreadNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
string  srcfield,
const SimObject::ID receiver,
int  recv_port,
const Time delay 
) [protected, virtual]

Reimplemented from SimNetwork.

Definition at line 217 of file SingleThreadNetwork.cpp.

References SimNetwork::_nAnalogMessages, STAnalogMessageCreator::addAnalogMessage(), SimNetwork::get_dt(), and Time::in_steps().

Here is the call graph for this function:

void SingleThreadNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
string  srcfield,
const SimObject::ID receiver,
string  destfield,
const Time delay 
) [protected, virtual]

Reimplemented from SimNetwork.

Definition at line 223 of file SingleThreadNetwork.cpp.

References SimNetwork::_nAnalogMessages, STAnalogMessageCreator::addAnalogMessage(), SimNetwork::get_dt(), and Time::in_steps().

Here is the call graph for this function:

SimObject * SingleThreadNetwork::_getObject_ ( const SimObject::ID id  )  [protected, virtual]

Reimplemented from SimNetwork.

Definition at line 126 of file SingleThreadNetwork.cpp.

References SingleThreadSimEngine::getObject().

Here is the call graph for this function:

virtual gl_engineid_t SingleThreadNetwork::maxLocalEngineID ( void   )  const [inline, protected, virtual]

Return the largest global simulation engine ID.

Return the largest local simulation engine ID at the executing node

Reimplemented from SimNetwork.

Definition at line 87 of file SingleThreadNetwork.h.

void SingleThreadNetwork::_initialize_ (  )  [protected, virtual]

Reimplemented from SimNetwork.

Definition at line 231 of file SingleThreadNetwork.cpp.

References SingleThreadSimEngine::initialize(), and SimNetwork::initialized.

Here is the call graph for this function:

void SingleThreadNetwork::_reset_ (  )  [protected, virtual]

Reimplemented from SimNetwork.

Definition at line 240 of file SingleThreadNetwork.cpp.

References SimNetwork::initialize(), SimNetwork::initialized, SingleThreadSimEngine::reset(), SingleThreadSpikeScheduler::reset(), and SimNetwork::reseted.

Here is the call graph for this function:

void SingleThreadNetwork::_advance_ ( int  nSteps = 1  )  [protected, virtual]

Reimplemented from SimNetwork.

Definition at line 248 of file SingleThreadNetwork.cpp.

References SingleThreadSimEngine::advance(), SimNetwork::reset(), and SimNetwork::reseted.

Here is the call graph for this function:

void SingleThreadNetwork::_insert_ ( const SimObjectFactory objFactory,
const SimObject::ID container,
SimObject::ID gid 
) [protected, virtual]

One instance of a simulation object is "inserted" into the container simulation object. The SimObject::quadID of the newly created object is returned.

Reimplemented from SimNetwork.

Definition at line 119 of file SingleThreadNetwork.cpp.

References SimNetwork::_mpi_rank, SimObject::ID::eng, SingleThreadSimEngine::insert(), and SimObject::ID::node.

Here is the call graph for this function:

void SingleThreadNetwork::_mount_ ( const SimObjectFactory objFactory,
const SimObject::ID mountpoint,
SimObject::ID gid 
) [protected, virtual]

One instance of a simulation object is "mounted" to the mount simulation object.

Reimplemented from SimNetwork.

Definition at line 112 of file SingleThreadNetwork.cpp.

References SimNetwork::_mpi_rank, SimObject::ID::eng, SingleThreadSimEngine::mount(), and SimObject::ID::node.

Here is the call graph for this function:

void SingleThreadNetwork::_connect_ ( SimObject::ID const &  src,
port_t  out,
const SimObject::ID dst,
port_t  in,
int  delay 
) [protected, virtual]

Make a connection (i.e. spike or analog message) from the src-out port to the dest-in port.

Reimplemented from SimNetwork.

Definition at line 134 of file SingleThreadNetwork.cpp.

References SimNetwork::addAnalogMessage(), SimNetwork::addSpikeMessage(), SimObject::analog, SimNetwork::get_dt(), SimObject::getManagedDelay(), SingleThreadSimEngine::getObject(), SimObject::inputPortType(), SimObject::outputPortType(), Time::sec(), SimObject::spiking, Time::steps(), and SimObject::ID::toString().

Here is the call graph for this function:

void SingleThreadNetwork::addLocalSpikeMessage ( LocalDelayMap arg_delayMap,
SpikeTargetGroupPool arg_stgPool,
SimEngine arg_simEng,
const spike_port_id_t  sender_port,
const SimObject::ID receiver,
port_t  in_port,
step_t  delay 
) [static, protected]

void SingleThreadNetwork::seed_noise_rng ( uint32  noiseRNGseed  )  [protected, virtual]


Friends And Related Function Documentation

friend class MultiThreadNetwork [friend]

Definition at line 87 of file SingleThreadNetwork.h.

friend class DistributedSingleThreadNetwork [friend]

Definition at line 94 of file SingleThreadNetwork.h.

friend class DistributedMultiThreadNetwork [friend]

Definition at line 95 of file SingleThreadNetwork.h.


The documentation for this class was generated from the following files:

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