#include <DistributedSyncWiringMethod.h>
Public Member Functions | |
DistributedSyncWiringMethod (SimNetwork &net) | |
New DistributedSyncWiringMethod which belongs to the given SimNetwork. | |
DistributedSyncWiringMethod (SimNetwork *net) | |
New DistributedSyncWiringMethod which belongs to the given SimNetwork. | |
virtual | ~DistributedSyncWiringMethod () |
Nothing to do but being virtual. | |
virtual unsigned | connect (const SimObjectPopulation &source, const SimObjectPopulation &destination, ConnectionIterator &iterator, bool collectPairs=false, WiringMethod::ConnectPairsVector connectPairs=WiringMethod::ConnectPairsVector(new vector< pair< SimObject::ID, SimObject::ID > >)) |
Make direct connections between source and dest. population. | |
virtual SimObject::ID::Vector | connect (const SimObjectPopulation &source, const SimObjectPopulation &destination, const SimObjectFactory &connector, ConnectionIterator &iterator, bool collectIDs=false, bool collectPairs=false, WiringMethod::ConnectPairsVector connectPairs=WiringMethod::ConnectPairsVector(new vector< pair< SimObject::ID, SimObject::ID > >)) |
Make connections between source and dest. population using a SimObjectFactory (usually some synapse) to connect the objects. | |
virtual SimObject::ID::Vector | connect (const SimObjectPopulation &source, const SimObjectPopulation &destination, ConnObjectFactory &connector, ConnectionIterator &iterator, bool collectIDs=false, bool collectPairs=false, WiringMethod::ConnectPairsVector connectPairs=WiringMethod::ConnectPairsVector(new vector< pair< SimObject::ID, SimObject::ID > >)) |
Make connections between source and dest. population using a SimObjectFactory (usually some synapse) to connect the objects. |
The basic idea here is that on two MPI nodes A and B only possible connections (a,b) between SimObjects a on A and b on B are considered and not the whole populations. Hence a lot of time is saved by not considering connectins (x,y) where either x not on A or y not on B. This allows basically for a wiring time which is proportional to n*n where n is the numbers of SimObjects belonging to one MPI node instead of N x N where N is the number of SimObject's in the whole population.
Definition at line 24 of file DistributedSyncWiringMethod.h.
DistributedSyncWiringMethod::DistributedSyncWiringMethod | ( | SimNetwork & | net | ) | [inline] |
New DistributedSyncWiringMethod which belongs to the given SimNetwork.
Definition at line 29 of file DistributedSyncWiringMethod.h.
DistributedSyncWiringMethod::DistributedSyncWiringMethod | ( | SimNetwork * | net | ) | [inline] |
New DistributedSyncWiringMethod which belongs to the given SimNetwork.
Definition at line 34 of file DistributedSyncWiringMethod.h.
virtual DistributedSyncWiringMethod::~DistributedSyncWiringMethod | ( | ) | [inline, virtual] |
unsigned DistributedSyncWiringMethod::connect | ( | const SimObjectPopulation & | source, | |
const SimObjectPopulation & | destination, | |||
ConnectionIterator & | iterator, | |||
bool | collectPairs = false , |
|||
WiringMethod::ConnectPairsVector | connectPairs = WiringMethod::ConnectPairsVector(new vector< pair< SimObject::ID, SimObject::ID > >) | |||
) | [virtual] |
Make direct connections between source and dest. population.
source | The source population | |
destination | The destination population (can be the same as source population) | |
iterator | The connection iterator to use (e.g. PredicateBasedConnections or RandomConnections ) which determines which connections are made. | |
collectPairs | Flaf which idicates wheter the pairs of ID's of the connected objects souble be collected or not. | |
connectPairs | Vector where the collected connection pairs are written to if collectPairs == true Be aware that the collected pairs are collected on each node of a distributed simulation when using a DistributedSingleThreadNetwork or DistributedMultiThreadNetwork which may lead to a large memory consumption. |
Implements WiringMethod.
Definition at line 98 of file DistributedSyncWiringMethod.cpp.
References SimNetwork::connect(), SimNetwork::getIncomingConstructRNGEngines(), SimNetwork::getOutgoingConstructRNGEngines(), SimObjectPopulation::idVector(), ConnectionIterator::init(), SimNetwork::mpi_rank(), WiringMethod::net, ConnectionIterator::next(), ConnectionIterator::reset(), and ConnectionIterator::setRNDEngine().
SimObject::ID::Vector DistributedSyncWiringMethod::connect | ( | const SimObjectPopulation & | source, | |
const SimObjectPopulation & | destination, | |||
const SimObjectFactory & | connector, | |||
ConnectionIterator & | iterator, | |||
bool | collectIDs = false , |
|||
bool | collectPairs = false , |
|||
WiringMethod::ConnectPairsVector | connectPairs = WiringMethod::ConnectPairsVector(new vector< pair< SimObject::ID, SimObject::ID > >) | |||
) | [virtual] |
Make connections between source and dest. population using a SimObjectFactory (usually some synapse) to connect the objects.
source | The source population | |
destination | The destination population (can be the same as source population) | |
connector | The SimObjectFactory to use to generate connecting objects (e.g. StaticSpikingSynapse) | |
iterator | The connection iterator to use (e.g. PredicateBasedConnections or RandomConnections ) which determines which connections are made. | |
collectIDs | Flag which idicates whether the SimObject::ID's of the generated connector objects should be collected or not. | |
collectPairs | Flaf which idicates wheter the pairs of ID's of the connected objects souble be collected or not. | |
connectPairs | Vector where the collected connection pairs are written to if collectPairs == true Be aware that the collected ID's or indices are collected on each node of a distributed simulation when using a DistributedSingleThreadNetwork or DistributedMultiThreadNetwork which may lead to a large memory consumption. |
Implements WiringMethod.
Definition at line 13 of file DistributedSyncWiringMethod.cpp.
References SimNetwork::connect(), SimNetwork::getIncomingConstructRNGEngines(), SimNetwork::getOutgoingConstructRNGEngines(), SimObjectPopulation::idVector(), ConnectionIterator::init(), SimNetwork::mpi_rank(), WiringMethod::net, ConnectionIterator::next(), ConnectionIterator::reset(), and ConnectionIterator::setRNDEngine().
SimObject::ID::Vector DistributedSyncWiringMethod::connect | ( | const SimObjectPopulation & | source, | |
const SimObjectPopulation & | destination, | |||
ConnObjectFactory & | connector, | |||
ConnectionIterator & | iterator, | |||
bool | collectIDs = false , |
|||
bool | collectPairs = false , |
|||
WiringMethod::ConnectPairsVector | connectPairs = WiringMethod::ConnectPairsVector(new vector< pair< SimObject::ID, SimObject::ID > >) | |||
) | [virtual] |
Make connections between source and dest. population using a SimObjectFactory (usually some synapse) to connect the objects.
source | The source population | |
destination | The destination population (can be the same as source population) | |
connector | The SimObjectFactory to use to generate connecting objects (e.g. StaticSpikingSynapse) | |
iterator | The connection iterator to use (e.g. PredicateBasedConnections or RandomConnections ) which determines which connections are made. | |
collectIDs | Flag which idicates whether the SimObject::ID's of the generated connector objects should be collected or not. | |
collectPairs | Flaf which idicates wheter the pairs of ID's of the connected objects souble be collected or not. | |
connectPairs | Vector where the collected connection pairs are written to if collectPairs == true Be aware that the collected ID's or indices are collected on each node of a distributed simulation when using a DistributedSingleThreadNetwork or DistributedMultiThreadNetwork which may lead to a large memory consumption. |
Implements WiringMethod.
Definition at line 167 of file DistributedSyncWiringMethod.cpp.
References SimNetwork::connect(), ConnectionIterator::getIdx(), SimNetwork::getIncomingConstructRNGEngines(), SimNetwork::getOutgoingConstructRNGEngines(), SimObjectPopulation::idVector(), ConnObjectFactory::init(), ConnectionIterator::init(), SimNetwork::mpi_rank(), WiringMethod::net, ConnectionIterator::next(), ConnectionIterator::reset(), and ConnectionIterator::setRNDEngine().