NEST main@caf0ae8
 
Loading...
Searching...
No Matches
nest::ConnectionManager Class Reference

#include <connection_manager.h>

Inheritance diagram for nest::ConnectionManager:
[legend]
Collaboration diagram for nest::ConnectionManager:
[legend]

Public Types

enum  ConnectionType { CONNECT , CONNECT_FROM_DEVICE , CONNECT_TO_DEVICE , NO_CONNECTION }
 

Public Member Functions

 ConnectionManager ()
 
 ~ConnectionManager () override
 
void initialize (const bool) override
 Prepare manager for operation.
 
void finalize (const bool) override
 Take down manager after operation.
 
void set_status (const Dictionary &) override
 Set the status of the manager.
 
void get_status (Dictionary &) override
 Retrieve the status of the manager.
 
bool valid_connection_rule (std::string)
 
void compute_target_data_buffer_size ()
 
void compute_compressed_secondary_recv_buffer_positions (const size_t tid)
 
void collect_compressed_spike_data (const size_t tid)
 
void clear_compressed_spike_data_map ()
 
template<typename ConnBuilder >
void register_conn_builder (const std::string &name)
 Add a connectivity rule, i.e.
 
template<typename ThirdConnBuilder >
void register_third_conn_builder (const std::string &name)
 Add a connectivity rule, i.e.
 
BipartiteConnBuilder * get_conn_builder (const std::string &name, NodeCollectionPTR sources, NodeCollectionPTR targets, ThirdOutBuilder *third_out, const Dictionary &conn_spec, const std::vector< Dictionary > &syn_specs)
 Obtain builder for bipartite connections.
 
ThirdOutBuilder * get_third_conn_builder (const std::string &name, NodeCollectionPTR sources, NodeCollectionPTR targets, ThirdInBuilder *third_in, const Dictionary &conn_spec, const std::vector< Dictionary > &syn_specs)
 Obtain builder for bipartite connections.
 
void connect (NodeCollectionPTR sources, NodeCollectionPTR targets, const Dictionary &conn_spec, const std::vector< Dictionary > &syn_specs)
 Create connections.
 
void connect (const size_t snode_id, Node *target, size_t target_thread, const synindex syn_id, const Dictionary &params, const double delay=numerics::nan, const double weight=numerics::nan)
 Connect two nodes.
 
bool connect (const size_t snode_id, const size_t target, const Dictionary &params, const synindex syn_id)
 Connect two nodes.
 
void connect_arrays (const long *sources, const long *targets, const double *weights, const double *delays, const std::vector< std::string > &p_keys, const double *p_values, size_t n, const std::string &syn_model)
 
void connect_sonata (const Dictionary &graph_specs, const long hyberslab_size)
 Connect nodes from SONATA specification.
 
void connect_tripartite (NodeCollectionPTR sources, NodeCollectionPTR targets, NodeCollectionPTR third, const Dictionary &connectivity, const Dictionary &third_connectivity, const std::map< std::string, std::vector< Dictionary > > &synapse_specs)
 Create tripartite connections.
 
size_t find_connection (const size_t tid, const synindex syn_id, const size_t snode_id, const size_t tnode_id)
 Find first non-disabled thread-local connection of given synapse type with given source and target node.
 
void disconnect (const size_t tid, const synindex syn_id, const size_t snode_id, const size_t tnode_id)
 
ConnectionType connection_required (Node *&source, Node *&target, size_t tid)
 Check whether a connection between the given source and target nodes can be established on the given thread with id tid.
 
Dictionary get_synapse_status (const size_t source_node_id, const size_t target_node_id, const size_t tid, const synindex syn_id, const size_t lcid) const
 
void set_synapse_status (const size_t source_node_id, const size_t target_node_id, const size_t tid, const synindex syn_id, const size_t lcid, const Dictionary &dict)
 
std::deque< ConnectionID > get_connections (const Dictionary &params)
 Return connections between pairs of neurons.
 
void get_connections (std::deque< ConnectionID > &connectome, NodeCollectionPTR source, NodeCollectionPTR target, synindex syn_id, long synapse_label) const
 
size_t get_num_connections () const
 Returns the number of connections in the network.
 
size_t get_num_connections (const synindex syn_id) const
 Returns the number of connections of this synapse type.
 
void get_sources (const std::vector< size_t > &targets, const size_t syn_id, std::vector< std::vector< size_t > > &sources)
 
void get_targets (const std::vector< size_t > &sources, const size_t syn_id, const std::string &post_synaptic_element, std::vector< std::vector< size_t > > &targets)
 
const std::vector< Target > & get_remote_targets_of_local_node (const size_t tid, const size_t lid) const
 
size_t get_target_node_id (const size_t tid, const synindex syn_id, const size_t lcid) const
 
bool get_device_connected (size_t tid, size_t lcid) const
 
void trigger_update_weight (const long vt_node_id, const std::vector< spikecounter > &dopa_spikes, const double t_trig)
 Triggered by volume transmitter in update.
 
long get_min_delay () const
 Return minimal connection delay, which is precomputed by update_delay_extrema_().
 
long get_max_delay () const
 Return maximal connection delay, which is precomputed by update_delay_extrema_().
 
bool get_user_set_delay_extrema () const
 
void send (const size_t tid, const synindex syn_id, const size_t lcid, const std::vector< ConnectorModel * > &cm, Event &e)
 
void send_to_devices (const size_t tid, const size_t source_node_id, Event &e)
 Send event e to all device targets of source source_node_id.
 
void send_to_devices (const size_t tid, const size_t source_node_id, SecondaryEvent &e)
 
void send_from_device (const size_t tid, const size_t ldid, Event &e)
 Send event e to all targets of source device ldid (local device id)
 
void send_local (size_t t, Node &source, Event &e)
 Send event e to all targets of node source on thread t.
 
void calibrate (const TimeConverter &)
 Resize the structures for the Connector objects if necessary.
 
DelayChecker & get_delay_checker ()
 Returns the delay checker for the current thread.
 
void clean_source_table (const size_t tid)
 Removes processed entries from source table.
 
void clear_source_table (const size_t tid)
 Clears all entries in source table.
 
bool get_keep_source_table () const
 Returns true if source table is kept after building network.
 
bool is_source_table_cleared () const
 Returns true if source table was cleared.
 
void prepare_target_table (const size_t tid)
 
void resize_target_table_devices_to_number_of_neurons ()
 
void resize_target_table_devices_to_number_of_synapse_types ()
 
bool get_next_target_data (const size_t tid, const size_t rank_start, const size_t rank_end, size_t &target_rank, TargetData &next_target_data)
 
bool fill_target_buffer (const size_t tid, const size_t rank_start, const size_t rank_end, std::vector< TargetData > &send_buffer_target_data, TargetSendBufferPosition &send_buffer_position)
 
void reject_last_target_data (const size_t tid)
 
void save_source_table_entry_point (const size_t tid)
 
void reset_source_table_entry_point (const size_t tid)
 
void restore_source_table_entry_point (const size_t tid)
 
void add_target (const size_t tid, const size_t target_rank, const TargetData &target_data)
 
bool use_compressed_spikes () const
 Returns whether spikes should be compressed.
 
void sort_connections (const size_t tid)
 Sorts connections in the presynaptic infrastructure by increasing source node ID.
 
bool connections_have_changed () const
 Returns true if connection information needs to be communicated.
 
void set_connections_have_changed ()
 Sets flag indicating whether connection information needs to be communicated to true.
 
void unset_connections_have_changed ()
 Sets flag indicating whether connection information needs to be communicated to false.
 
void restructure_connection_tables (const size_t tid)
 Deletes TargetTable and resets processed flags of SourceTable.
 
void set_source_has_more_targets (const size_t tid, const synindex syn_id, const size_t lcid, const bool more_targets)
 
void no_targets_to_process (const size_t tid)
 
const std::vector< size_t > & get_secondary_send_buffer_positions (const size_t tid, const size_t lid, const synindex syn_id) const
 
size_t get_secondary_recv_buffer_position (const size_t tid, const synindex syn_id, const size_t lcid) const
 Returns read position in MPI receive buffer for secondary connections.
 
bool deliver_secondary_events (const size_t tid, const bool called_from_wfr_update, std::vector< unsigned int > &recv_buffer)
 
void compress_secondary_send_buffer_pos (const size_t tid)
 
void resize_connections ()
 
void sync_has_primary_connections ()
 
void check_secondary_connections_exist ()
 
bool has_primary_connections () const
 
bool secondary_connections_exist () const
 
size_t get_source_node_id (const size_t tid, const synindex syn_id, const size_t lcid)
 
double get_stdp_eps () const
 
void set_stdp_eps (const double stdp_eps)
 
const std::vector< SpikeData > & get_compressed_spike_data (const synindex syn_id, const size_t idx)
 
void initialize_iteration_state ()
 Set iteration_state_ entries for all threads to beginning of compressed_spike_data_map_.
 
- Public Member Functions inherited from nest::ManagerInterface
 ManagerInterface (ManagerInterface const &)=delete
 
void operator= (ManagerInterface const &)=delete
 
 ManagerInterface ()
 
virtual ~ManagerInterface ()
 
virtual void prepare ()
 
virtual void cleanup ()
 

Public Attributes

Stopwatch< StopwatchGranularity::Normal, StopwatchParallelism::MasterOnly > sw_construction_connect
 

Private Member Functions

size_t get_num_target_data (const size_t tid) const
 
size_t get_num_connections_ (const size_t tid, const synindex syn_id) const
 
void get_connections_ (const size_t tid, std::deque< ConnectionID > &connectome, NodeCollectionPTR source, NodeCollectionPTR target, synindex syn_id, long synapse_label) const
 See get_connections()
 
void get_connections_to_targets_ (const size_t tid, std::deque< ConnectionID > &connectome, NodeCollectionPTR source, NodeCollectionPTR target, synindex syn_id, long synapse_label) const
 
void get_connections_from_sources_ (const size_t tid, std::deque< ConnectionID > &connectome, NodeCollectionPTR source, NodeCollectionPTR target, synindex syn_id, long synapse_label) const
 
void get_source_node_ids_ (const size_t tid, const synindex syn_id, const size_t tnode_id, std::vector< size_t > &sources)
 
void remove_disabled_connections_ (const size_t tid)
 Removes disabled connections (of structural plasticity)
 
void split_to_neuron_device_vectors_ (const size_t tid, NodeCollectionPTR nodecollection, std::vector< size_t > &neuron_node_ids, std::vector< size_t > &device_node_ids) const
 Splits a TokenArray of node IDs to two vectors containing node IDs of neurons and node IDs of devices.
 
void update_delay_extrema_ ()
 Update delay extrema to current values.
 
const Time get_min_delay_time_ () const
 This method queries and finds the minimum delay of all local connections.
 
const Time get_max_delay_time_ () const
 This method queries and finds the maximum delay of all local connections.
 
void delete_connections_ ()
 Deletes all connections.
 
void connect_ (Node &source, Node &target, const size_t s_node_id, const size_t tid, const synindex syn_id, const Dictionary &params, const double delay=numerics::nan, const double weight=numerics::nan)
 connect_ is used to establish a connection between a sender and receiving node which both have proxies.
 
void connect_to_device_ (Node &source, Node &target, const size_t s_node_id, const size_t tid, const synindex syn_id, const Dictionary &params, const double delay=NAN, const double weight=NAN)
 connect_to_device_ is used to establish a connection between a sender and receiving node if the sender has proxies, and the receiver does not.
 
void connect_from_device_ (Node &source, Node &target, const size_t tid, const synindex syn_id, const Dictionary &params, const double delay=NAN, const double weight=NAN)
 connect_from_device_ is used to establish a connection between a sender and receiving node if the sender does not have proxies.
 
void increase_connection_count (const size_t tid, const synindex syn_id)
 Increases the connection count.
 

Private Attributes

std::vector< std::vector< ConnectorBase * > > connections_
 A structure to hold the Connector objects which in turn hold the connection information.
 
SourceTable source_table_
 A structure to hold the node IDs of presynaptic neurons during postsynaptic connection creation, before the connection information has been transferred to the presynaptic side.
 
std::vector< std::vector< std::vector< SpikeData > > > compressed_spike_data_
 A structure to hold "unpacked" spikes on the postsynaptic side if spike compression is enabled.
 
std::vector< std::vector< std::vector< size_t > > > secondary_recv_buffer_pos_
 Stores absolute position in receive buffer of secondary events.
 
std::map< size_t, size_t > buffer_pos_of_source_node_id_syn_id_
 
TargetTable target_table_
 A structure to hold the information about targets for each neuron on the presynaptic side.
 
TargetTableDevices target_table_devices_
 
std::vector< DelayChecker > delay_checkers_
 
std::vector< std::vector< size_t > > num_connections_
 A structure to count the number of synapses of a specific type.
 
Dictionary connruledict_
 Dictionary for connection rules.
 
std::vector< GenericBipartiteConnBuilderFactory * > connbuilder_factories_
 ConnBuilder factories, indexed by connruledict_ elements.
 
Dictionary thirdconnruledict_
 Dictionary for third-factor connection rules.
 
std::vector< GenericThirdConnBuilderFactory * > thirdconnbuilder_factories_
 Third-factor ConnBuilder factories, indexed by thirdconnruledict_ elements.
 
long min_delay_
 Value of the smallest delay in the network.
 
long max_delay_
 Value of the largest delay in the network in steps.
 
bool keep_source_table_
 Whether to keep source table after connection setup is complete.
 
bool connections_have_changed_
 True if new connections have been created since startup or last call to simulate.
 
bool get_connections_has_been_called_
 true if GetConnections has been called.
 
bool use_compressed_spikes_
 Whether to use spike compression; if a neuron has targets on multiple threads of a process, this switch makes sure that only a single packet is sent to the process instead of one packet per target thread; implies sort_connections_by_source_ = true; for more details see the discussion and sketch in https://github.com/nest/nest-simulator/pull/1338.
 
bool has_primary_connections_
 Whether primary connections (spikes) exist.
 
PerThreadBoolIndicator check_primary_connections_
 Check for primary connections (spikes) on each thread.
 
bool secondary_connections_exist_
 Whether secondary connections (e.g., gap junctions) exist.
 
PerThreadBoolIndicator check_secondary_connections_
 Check for secondary connections (e.g., gap junctions) on each thread.
 
double stdp_eps_
 Maximum distance between (double) spike times in STDP that is still considered 0.
 
std::vector< std::pair< size_t, std::map< size_t, CSDMapEntry >::const_iterator > > iteration_state_
 For each thread, store (syn_id, compressed_spike_data_map_::iterator) pair for next iteration while filling target buffers.
 

Friends

class SimulationManager
 

Member Enumeration Documentation

◆ ConnectionType

Enumerator
CONNECT 
CONNECT_FROM_DEVICE 
CONNECT_TO_DEVICE 
NO_CONNECTION 

Constructor & Destructor Documentation

◆ ConnectionManager()

nest::ConnectionManager::ConnectionManager ( )

◆ ~ConnectionManager()

nest::ConnectionManager::~ConnectionManager ( )
override

Member Function Documentation

◆ add_target()

void nest::ConnectionManager::add_target ( const size_t  tid,
const size_t  target_rank,
const TargetData &  target_data 
)
inline

References nest::TargetTable::add_target(), and target_table_.

Referenced by nest::EventDeliveryManager::distribute_target_data_buffers_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calibrate()

void nest::ConnectionManager::calibrate ( const TimeConverter &  tc)

Resize the structures for the Connector objects if necessary.

This function should be called after number of threads, min_delay, max_delay, and time representation have been changed in the scheduler. The TimeConverter is used to convert times from the old to the new representation. It is also forwarding the calibration request to all ConnectorModel objects.

References delay_checkers_, nest::VPManager::get_num_threads(), nest::kernel(), and nest::KernelManager::vp_manager.

Referenced by nest::SimulationManager::set_status().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_secondary_connections_exist()

void nest::ConnectionManager::check_secondary_connections_exist ( )

References nest::MPIManager::any_true(), nest::kernel(), nest::KernelManager::mpi_manager, and secondary_connections_exist_.

Referenced by nest::SimulationManager::update_connection_infrastructure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clean_source_table()

void nest::ConnectionManager::clean_source_table ( const size_t  tid)
inline

Removes processed entries from source table.

References nest::SourceTable::clean(), keep_source_table_, and source_table_.

Referenced by nest::EventDeliveryManager::gather_target_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear_compressed_spike_data_map()

void nest::ConnectionManager::clear_compressed_spike_data_map ( )
inline

References nest::SourceTable::clear_compressed_spike_data_map(), and source_table_.

Referenced by nest::SimulationManager::update_connection_infrastructure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear_source_table()

void nest::ConnectionManager::clear_source_table ( const size_t  tid)
inline

Clears all entries in source table.

References nest::SourceTable::clear(), keep_source_table_, and source_table_.

Referenced by nest::EventDeliveryManager::gather_target_data(), and nest::EventDeliveryManager::gather_target_data_compressed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ collect_compressed_spike_data()

void nest::ConnectionManager::collect_compressed_spike_data ( const size_t  tid)

References nest::SourceTable::collect_compressible_sources(), compressed_spike_data_, nest::SourceTable::fill_compressed_spike_data(), nest::KernelManager::get_omp_synchronization_construction_stopwatch(), nest::kernel(), nest::SourceTable::resize_compressible_sources(), source_table_, nest::Stopwatch< detailed_timer, threaded_timer >::start(), nest::Stopwatch< detailed_timer, threaded_timer >::stop(), and use_compressed_spikes_.

Referenced by nest::SimulationManager::update_connection_infrastructure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compress_secondary_send_buffer_pos()

void nest::ConnectionManager::compress_secondary_send_buffer_pos ( const size_t  tid)

References nest::TargetTable::compress_secondary_send_buffer_pos(), and target_table_.

Referenced by nest::SimulationManager::update_connection_infrastructure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_compressed_secondary_recv_buffer_positions()

void nest::ConnectionManager::compute_compressed_secondary_recv_buffer_positions ( const size_t  tid)

◆ compute_target_data_buffer_size()

void nest::ConnectionManager::compute_target_data_buffer_size ( )

References nest::MPIManager::communicate(), nest::MPIManager::get_num_processes(), get_num_target_data(), nest::VPManager::get_num_threads(), nest::MPIManager::get_rank(), nest::kernel(), nest::KernelManager::mpi_manager, nest::MPIManager::set_buffer_size_target_data(), and nest::KernelManager::vp_manager.

Referenced by nest::SimulationManager::update_connection_infrastructure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connect() [1/3]

bool nest::ConnectionManager::connect ( const size_t  snode_id,
const size_t  target,
const Dictionary &  params,
const synindex  syn_id 
)

Connect two nodes.

The source and target nodes are defined by their global ID. The connection is established on the thread/process that owns the target node.

Parameters
snode_idnode ID of the sending Node.
targetnode ID of the target Node.
paramsParameter dictionary to configure the synapse.
syn_idThe synapse model to use.

References nest::ModelManager::assert_valid_syn_id(), CONNECT, connect_(), CONNECT_FROM_DEVICE, connect_from_device_(), CONNECT_TO_DEVICE, connect_to_device_(), connection_required(), nest::NodeManager::get_node_or_proxy(), nest::VPManager::get_thread_id(), nest::kernel(), nest::KernelManager::model_manager, NO_CONNECTION, nest::KernelManager::node_manager, and nest::KernelManager::vp_manager.

Here is the call graph for this function:

◆ connect() [2/3]

void nest::ConnectionManager::connect ( const size_t  snode_id,
Node *  target,
size_t  target_thread,
const synindex  syn_id,
const Dictionary &  params,
const double  delay = numerics::nan,
const double  weight = numerics::nan 
)

Connect two nodes.

The source node is defined by its global ID. The target node is defined by the node. The connection is established on the thread/process that owns the target node.

The parameters delay and weight have the default value numerics::nan. numerics::nan is a special value, which describes double values that are not a number. If delay or weight is omitted in a connect call, numerics::nan indicates this and weight/delay are set only, if they are valid.

Parameters
snode_idnode ID of the sending Node.
targetPointer to target Node.
target_threadThread that hosts the target node.
syn_idThe synapse model to use.
paramsParameter dictionary to configure the synapse.
delayDelay of the connection (in ms).
weightWeight of the connection.

References nest::ModelManager::assert_valid_syn_id(), CONNECT, connect_(), CONNECT_FROM_DEVICE, connect_from_device_(), CONNECT_TO_DEVICE, connect_to_device_(), connection_required(), nest::NodeManager::get_node_or_proxy(), nest::kernel(), nest::KernelManager::model_manager, NO_CONNECTION, and nest::KernelManager::node_manager.

Here is the call graph for this function:

◆ connect() [3/3]

◆ connect_()

void nest::ConnectionManager::connect_ ( Node &  source,
Node &  target,
const size_t  s_node_id,
const size_t  tid,
const synindex  syn_id,
const Dictionary &  params,
const double  delay = numerics::nan,
const double  weight = numerics::nan 
)
private

connect_ is used to establish a connection between a sender and receiving node which both have proxies.

The parameters delay and weight have the default value numerics::nan. numerics::nan is a special value, which describes double values that are not a number. If delay or weight is omitted in an connect call, numerics::nan indicates this and weight/delay are set only, if they are valid.

Parameters
sourceA reference to the sending Node.
targetA reference to the receiving Node.
s_node_idThe node ID of the sending Node.
tidThe thread of the target node.
syn_idThe synapse model to use.
paramsThe parameters for the connection.
delayThe delay of the connection (optional).
weightThe weight of the connection (optional).

References nest::ConnectorModel::add_connection(), nest::SourceTable::add_source(), check_primary_connections_, check_secondary_connections_, connections_, nest::ModelManager::get_connection_model(), has_primary_connections_, nest::ConnectorModel::has_property(), increase_connection_count(), nest::IS_PRIMARY, nest::kernel(), nest::KernelManager::model_manager, nest::REQUIRES_CLOPATH_ARCHIVING, nest::REQUIRES_EPROP_ARCHIVING, nest::REQUIRES_URBANCZIK_ARCHIVING, secondary_connections_exist_, nest::PerThreadBoolIndicator::set_true(), and source_table_.

Referenced by connect(), and connect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connect_arrays()

void nest::ConnectionManager::connect_arrays ( const long *  sources,
const long *  targets,
const double *  weights,
const double *  delays,
const std::vector< std::string > &  p_keys,
const double *  p_values,
size_t  n,
const std::string &  syn_model 
)

◆ connect_from_device_()

void nest::ConnectionManager::connect_from_device_ ( Node &  source,
Node &  target,
const size_t  tid,
const synindex  syn_id,
const Dictionary &  params,
const double  delay = NAN,
const double  weight = NAN 
)
private

connect_from_device_ is used to establish a connection between a sender and receiving node if the sender does not have proxies.

The parameters delay and weight have the default value NAN. NAN is a special value in cmath, which describes double values that are not a number. If delay or weight is omitted in an connect call, NAN indicates this and weight/delay are set only, if they are valid.

Parameters
sourceA reference to the sending Node.
targetA reference to the receiving Node.
s_node_idThe node ID of the sending Node.
tidThe thread of the target node.
syn_idThe synapse model to use.
paramsThe parameters for the connection.
delayThe delay of the connection (optional).
weightThe weight of the connection (optional).

References nest::TargetTableDevices::add_connection_from_device(), increase_connection_count(), and target_table_devices_.

Referenced by connect(), and connect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connect_sonata()

void nest::ConnectionManager::connect_sonata ( const Dictionary &  graph_specs,
const long  hyberslab_size 
)

Connect nodes from SONATA specification.

This function instantiates the SonataConnector class and calls the class member function connect.

Parameters
graph_specsSpecification dictionary, see PyNEST SonataNetwork._create_graph_specs for details.
hyberslab_sizeSize of the hyperslab to read in one read operation, applies to all HDF5 datasets.

References nest::KernelManager::connection_manager, nest::kernel(), nest::KernelManager::node_manager, set_connections_have_changed(), nest::Stopwatch< detailed_timer, threaded_timer >::start(), nest::Stopwatch< detailed_timer, threaded_timer >::stop(), sw_construction_connect, and nest::NodeManager::update_thread_local_node_data().

Referenced by nest::connect_sonata().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connect_to_device_()

void nest::ConnectionManager::connect_to_device_ ( Node &  source,
Node &  target,
const size_t  s_node_id,
const size_t  tid,
const synindex  syn_id,
const Dictionary &  params,
const double  delay = NAN,
const double  weight = NAN 
)
private

connect_to_device_ is used to establish a connection between a sender and receiving node if the sender has proxies, and the receiver does not.

The parameters delay and weight have the default value NAN. NAN is a special value in cmath, which describes double values that are not a number. If delay or weight is omitted in an connect call, NAN indicates this and weight/delay are set only, if they are valid.

Parameters
sourceA reference to the sending Node.
targetA reference to the receiving Node.
s_node_idThe node ID of the sending Node.
tidThe thread of the target node.
syn_idThe synapse model to use.
paramsThe parameters for the connection.
delayThe delay of the connection (optional).
weightThe weight of the connection (optional).

References nest::TargetTableDevices::add_connection_to_device(), increase_connection_count(), and target_table_devices_.

Referenced by connect(), and connect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connect_tripartite()

void nest::ConnectionManager::connect_tripartite ( NodeCollectionPTR  sources,
NodeCollectionPTR  targets,
NodeCollectionPTR  third,
const Dictionary &  connectivity,
const Dictionary &  third_connectivity,
const std::map< std::string, std::vector< Dictionary > > &  synapse_specs 
)

Create tripartite connections.

Note
synapse_specs is dictionary {"primary": <syn_spec>, "third_in": <syn_spec>, "third_out": <syn_spec>}; all keys are optional

References Dictionary::all_entries_accessed(), nest::ConnBuilder::connect(), nest::KernelManager::connection_manager, Dictionary::get(), Dictionary::init_access_flags(), nest::kernel(), Dictionary::known(), nest::KernelManager::node_manager, nest::names::rule(), set_connections_have_changed(), nest::Stopwatch< detailed_timer, threaded_timer >::start(), nest::Stopwatch< detailed_timer, threaded_timer >::stop(), sw_construction_connect, and nest::NodeManager::update_thread_local_node_data().

Referenced by nest::connect_tripartite().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connection_required()

ConnectionManager::ConnectionType nest::ConnectionManager::connection_required ( Node *&  source,
Node *&  target,
size_t  tid 
)

Check whether a connection between the given source and target nodes can be established on the given thread with id tid.

Returns
The type of connection as ConnectionType if the connection should be made, ConnectionType::NO_CONNECTION otherwise.

References CONNECT, CONNECT_FROM_DEVICE, CONNECT_TO_DEVICE, nest::NodeManager::get_node_or_proxy(), nest::VPManager::is_local_vp(), nest::kernel(), NO_CONNECTION, nest::VPManager::node_id_to_vp(), nest::KernelManager::node_manager, nest::KernelManager::vp_manager, and nest::VPManager::vp_to_thread().

Referenced by connect(), and connect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ connections_have_changed()

bool nest::ConnectionManager::connections_have_changed ( ) const
inline

Returns true if connection information needs to be communicated.

False otherwise.

References connections_have_changed_.

Referenced by get_connections().

Here is the caller graph for this function:

◆ delete_connections_()

void nest::ConnectionManager::delete_connections_ ( )
private

Deletes all connections.

References connections_.

Referenced by finalize().

Here is the caller graph for this function:

◆ deliver_secondary_events()

bool nest::ConnectionManager::deliver_secondary_events ( const size_t  tid,
const bool  called_from_wfr_update,
std::vector< unsigned int > &  recv_buffer 
)

◆ disconnect()

void nest::ConnectionManager::disconnect ( const size_t  tid,
const synindex  syn_id,
const size_t  snode_id,
const size_t  tnode_id 
)

References connections_, nest::SourceTable::disable_connection(), find_connection(), nest::invalid_synindex, num_connections_, and source_table_.

Referenced by nest::SPManager::delete_synapse(), and nest::SPManager::disconnect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_target_buffer()

bool nest::ConnectionManager::fill_target_buffer ( const size_t  tid,
const size_t  rank_start,
const size_t  rank_end,
std::vector< TargetData > &  send_buffer_target_data,
TargetSendBufferPosition &  send_buffer_position 
)

References nest::TargetSendBufferPosition::begin(), compressed_spike_data_, nest::SourceTable::compressed_spike_data_map_, nest::ModelManager::get_connection_model(), nest::SpikeData::get_lcid(), nest::MPIManager::get_process_id_of_node_id(), nest::MPIManager::get_recv_displacement_secondary_events_in_int(), get_secondary_recv_buffer_position(), nest::SpikeData::get_tid(), nest::ConnectorModel::has_property(), nest::TargetSendBufferPosition::idx(), nest::TargetSendBufferPosition::increase(), nest::TargetSendBufferPosition::is_chunk_filled(), nest::IS_PRIMARY, iteration_state_, nest::kernel(), nest::KernelManager::model_manager, nest::KernelManager::mpi_manager, nest::VPManager::node_id_to_lid(), nest::TargetData::reset_marker(), nest::TargetData::secondary_data, nest::TargetData::set_is_primary(), nest::TargetDataFields::set_lcid(), nest::SecondaryTargetDataFields::set_recv_buffer_pos(), nest::TargetData::set_source_lid(), nest::TargetData::set_source_tid(), nest::TargetDataFields::set_syn_id(), nest::SecondaryTargetDataFields::set_syn_id(), nest::TargetDataFields::set_tid(), source_table_, nest::TargetData::target_data, nest::KernelManager::vp_manager, and nest::VPManager::vp_to_thread().

Referenced by nest::EventDeliveryManager::collocate_target_data_buffers_compressed_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ finalize()

void nest::ConnectionManager::finalize ( const bool  adjust_number_of_threads_or_rng_only)
overridevirtual

Take down manager after operation.

After this method has completed, all dynamic data structures created by the manager shall be deallocated and containers emptied. Plain variables need not be reset.

Note
Finalization of any given manager may depend on other managers not having been finalized yet. KernelManager::finalize() is responsible for calling the initialization routines on the specific managers in correct order, i.e., the opposite order of initialize() calls.
Parameters
adjust_number_of_threads_or_rng_onlyPass true if calling from kernel_manager::change_number_of_threads() to limit operations to those necessary for thread adjustment.
See also
initialize()

Implements nest::ManagerInterface.

References Dictionary::clear(), compressed_spike_data_, connbuilder_factories_, connections_, connruledict_, delete_connections_(), nest::SourceTable::finalize(), nest::TargetTable::finalize(), nest::TargetTableDevices::finalize(), secondary_recv_buffer_pos_, source_table_, target_table_, target_table_devices_, thirdconnbuilder_factories_, and thirdconnruledict_.

Here is the call graph for this function:

◆ find_connection()

size_t nest::ConnectionManager::find_connection ( const size_t  tid,
const synindex  syn_id,
const size_t  snode_id,
const size_t  tnode_id 
)

Find first non-disabled thread-local connection of given synapse type with given source and target node.

Returns
Local connection id (lcid) or invalid_index

References connections_, nest::SourceTable::find_first_source(), source_table_, and use_compressed_spikes_.

Referenced by disconnect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_compressed_spike_data()

const std::vector< SpikeData > & nest::ConnectionManager::get_compressed_spike_data ( const synindex  syn_id,
const size_t  idx 
)
inline

References compressed_spike_data_.

Referenced by nest::EventDeliveryManager::deliver_events_().

Here is the caller graph for this function:

◆ get_conn_builder()

BipartiteConnBuilder * nest::ConnectionManager::get_conn_builder ( const std::string &  name,
NodeCollectionPTR  sources,
NodeCollectionPTR  targets,
ThirdOutBuilder *  third_out,
const Dictionary &  conn_spec,
const std::vector< Dictionary > &  syn_specs 
)

Obtain builder for bipartite connections.

References connbuilder_factories_, connruledict_, Dictionary::get(), and Dictionary::known().

Referenced by nest::SPManager::disconnect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_connections() [1/2]

std::deque< ConnectionID > nest::ConnectionManager::get_connections ( const Dictionary &  params)

Return connections between pairs of neurons.

The params dictionary can have the following entries: 'source' a token array with node IDs of source neurons. 'target' a token array with node IDs of target neuron. If either of these does not exist, all neuron are used for the respective entry. 'synapse_model' name of the synapse model, or all synapse models are searched. 'synapse_label' label (long) of the synapse, or all synapses are searched. The function then iterates all entries in source and collects the connection IDs to all neurons in target.

References nest::NodeManager::check_wfr_use(), connections_have_changed(), get_connections(), get_connections_has_been_called_, nest::ModelManager::get_num_connection_models(), nest::ModelManager::get_synapse_model_id(), nest::VPManager::get_thread_id(), nest::kernel(), nest::KernelManager::model_manager, nest::KernelManager::node_manager, nest::KernelManager::simulation_manager, nest::names::source(), nest::names::synapse_label(), nest::names::synapse_model(), nest::names::target(), nest::UNLABELED_CONNECTION, nest::SimulationManager::update_connection_infrastructure(), update_delay_extrema_(), and nest::KernelManager::vp_manager.

Referenced by nest::Layer< D >::dump_connections(), nest::get_connections(), and get_connections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_connections() [2/2]

void nest::ConnectionManager::get_connections ( std::deque< ConnectionID > &  connectome,
NodeCollectionPTR  source,
NodeCollectionPTR  target,
synindex  syn_id,
long  synapse_label 
) const

References nest::extend_connectome(), get_connections_(), get_connections_from_sources_(), get_connections_to_targets_(), get_num_connections(), nest::VPManager::get_thread_id(), is_source_table_cleared(), nest::kernel(), and nest::KernelManager::vp_manager.

Here is the call graph for this function:

◆ get_connections_()

void nest::ConnectionManager::get_connections_ ( const size_t  tid,
std::deque< ConnectionID > &  connectome,
NodeCollectionPTR  source,
NodeCollectionPTR  target,
synindex  syn_id,
long  synapse_label 
) const
private

See get_connections()

References connections_, nest::ConnectorBase::get_connection(), nest::TargetTableDevices::get_connections(), nest::SourceTable::get_node_id(), nest::ConnectorBase::size(), source_table_, and target_table_devices_.

Referenced by get_connections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_connections_from_sources_()

void nest::ConnectionManager::get_connections_from_sources_ ( const size_t  tid,
std::deque< ConnectionID > &  connectome,
NodeCollectionPTR  source,
NodeCollectionPTR  target,
synindex  syn_id,
long  synapse_label 
) const
private

References connections_, nest::ConnectorBase::get_connection(), nest::ConnectorBase::get_connection_with_specified_targets(), nest::TargetTableDevices::get_connections(), nest::TargetTableDevices::get_connections_from_devices_(), nest::TargetTableDevices::get_connections_to_devices_(), nest::SourceTable::get_node_id(), nest::ConnectorBase::size(), source_table_, split_to_neuron_device_vectors_(), and target_table_devices_.

Referenced by get_connections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_connections_to_targets_()

void nest::ConnectionManager::get_connections_to_targets_ ( const size_t  tid,
std::deque< ConnectionID > &  connectome,
NodeCollectionPTR  source,
NodeCollectionPTR  target,
synindex  syn_id,
long  synapse_label 
) const
private

References connections_, nest::ConnectorBase::get_connection_with_specified_targets(), nest::TargetTableDevices::get_connections_from_devices_(), nest::TargetTableDevices::get_connections_to_devices_(), nest::SourceTable::get_node_id(), nest::ConnectorBase::size(), source_table_, split_to_neuron_device_vectors_(), and target_table_devices_.

Referenced by get_connections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_delay_checker()

DelayChecker & nest::ConnectionManager::get_delay_checker ( )

Returns the delay checker for the current thread.

References delay_checkers_, nest::VPManager::get_thread_id(), nest::kernel(), and nest::KernelManager::vp_manager.

Referenced by nest::GenericConnectorModel< ConnectionT >::add_connection(), nest::GenericConnectorModel< ConnectionT >::set_status(), nest::cont_delay_synapse< targetidentifierT >::set_status(), nest::Connection< targetidentifierT >::set_status(), and nest::GenericConnectorModel< ConnectionT >::used_default_delay().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_device_connected()

bool nest::ConnectionManager::get_device_connected ( size_t  tid,
size_t  lcid 
) const
inline

References nest::TargetTableDevices::is_device_connected(), and target_table_devices_.

Referenced by nest::StimulationBackendMPI::prepare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_keep_source_table()

bool nest::ConnectionManager::get_keep_source_table ( ) const
inline

Returns true if source table is kept after building network.

References keep_source_table_.

◆ get_max_delay()

long nest::ConnectionManager::get_max_delay ( ) const
inline

◆ get_max_delay_time_()

const Time nest::ConnectionManager::get_max_delay_time_ ( ) const
private

This method queries and finds the maximum delay of all local connections.

References delay_checkers_, and nest::Time::get_resolution().

Referenced by update_delay_extrema_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_min_delay()

long nest::ConnectionManager::get_min_delay ( ) const
inline

◆ get_min_delay_time_()

const Time nest::ConnectionManager::get_min_delay_time_ ( ) const
private

This method queries and finds the minimum delay of all local connections.

References delay_checkers_, and nest::Time::pos_inf().

Referenced by update_delay_extrema_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_next_target_data()

bool nest::ConnectionManager::get_next_target_data ( const size_t  tid,
const size_t  rank_start,
const size_t  rank_end,
size_t &  target_rank,
TargetData &  next_target_data 
)
inline

References nest::SourceTable::get_next_target_data(), and source_table_.

Referenced by nest::EventDeliveryManager::collocate_target_data_buffers_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_num_connections() [1/2]

size_t nest::ConnectionManager::get_num_connections ( ) const

Returns the number of connections in the network.

References num_connections_.

Referenced by get_connections(), nest::ModelManager::get_connector_defaults(), get_status(), nest::EpropSynapseCommonProperties::set_status(), and nest::EpropSynapseBSSHSLM2020CommonProperties::set_status().

Here is the caller graph for this function:

◆ get_num_connections() [2/2]

size_t nest::ConnectionManager::get_num_connections ( const synindex  syn_id) const

Returns the number of connections of this synapse type.

References num_connections_.

◆ get_num_connections_()

size_t nest::ConnectionManager::get_num_connections_ ( const size_t  tid,
const synindex  syn_id 
) const
inlineprivate

References connections_.

Referenced by compute_compressed_secondary_recv_buffer_positions().

Here is the caller graph for this function:

◆ get_num_target_data()

size_t nest::ConnectionManager::get_num_target_data ( const size_t  tid) const
private

References connections_, nest::SourceTable::num_unique_sources(), and source_table_.

Referenced by compute_target_data_buffer_size().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_remote_targets_of_local_node()

const std::vector< Target > & nest::ConnectionManager::get_remote_targets_of_local_node ( const size_t  tid,
const size_t  lid 
) const
inline

References nest::TargetTable::get_targets(), and target_table_.

Referenced by nest::EventDeliveryManager::send_off_grid_remote(), and nest::EventDeliveryManager::send_remote().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_secondary_recv_buffer_position()

size_t nest::ConnectionManager::get_secondary_recv_buffer_position ( const size_t  tid,
const synindex  syn_id,
const size_t  lcid 
) const
inline

Returns read position in MPI receive buffer for secondary connections.

References secondary_recv_buffer_pos_.

Referenced by fill_target_buffer(), and nest::SourceTable::populate_target_data_fields_().

Here is the caller graph for this function:

◆ get_secondary_send_buffer_positions()

const std::vector< size_t > & nest::ConnectionManager::get_secondary_send_buffer_positions ( const size_t  tid,
const size_t  lid,
const synindex  syn_id 
) const
inline

References nest::TargetTable::get_secondary_send_buffer_positions(), and target_table_.

Referenced by nest::EventDeliveryManager::send_secondary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_source_node_id()

size_t nest::ConnectionManager::get_source_node_id ( const size_t  tid,
const synindex  syn_id,
const size_t  lcid 
)
inline

References nest::SourceTable::get_node_id(), and source_table_.

Referenced by nest::Event::retrieve_sender_node_id_from_source_table().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_source_node_ids_()

void nest::ConnectionManager::get_source_node_ids_ ( const size_t  tid,
const synindex  syn_id,
const size_t  tnode_id,
std::vector< size_t > &  sources 
)
private

References connections_, nest::SourceTable::get_source_node_ids(), and source_table_.

Referenced by get_sources().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_sources()

void nest::ConnectionManager::get_sources ( const std::vector< size_t > &  targets,
const size_t  syn_id,
std::vector< std::vector< size_t > > &  sources 
)

References nest::VPManager::get_num_threads(), get_source_node_ids_(), nest::kernel(), and nest::KernelManager::vp_manager.

Referenced by nest::SPManager::delete_synapses_from_post().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_status()

void nest::ConnectionManager::get_status ( Dictionary &  )
overridevirtual

Retrieve the status of the manager.

Note
This would ideally be a const function. However, some managers delay the update of internal variables up to the point where they are needed (e.g., before reporting their values to the user, or before simulate is called). An example for this pattern is the call to update_delay_extrema_() right at the beginning of ConnectionManager::get_status().
See also
set_status()

Implements nest::ManagerInterface.

References nest::names::connection_rules(), connruledict_, nest::Time::get_ms(), get_num_connections(), nest::Stopwatch< detailed_timer, threaded_timer >::get_status(), nest::names::keep_source_table(), keep_source_table_, nest::names::max_delay(), max_delay_, nest::names::min_delay(), min_delay_, nest::names::num_connections(), sw_construction_connect, nest::names::time_construction_connect(), nest::names::time_construction_connect_cpu(), update_delay_extrema_(), nest::names::use_compressed_spikes(), and use_compressed_spikes_.

Here is the call graph for this function:

◆ get_stdp_eps()

double nest::ConnectionManager::get_stdp_eps ( ) const
inline

References stdp_eps_.

Referenced by nest::ArchivingNode::get_history().

Here is the caller graph for this function:

◆ get_synapse_status()

Dictionary nest::ConnectionManager::get_synapse_status ( const size_t  source_node_id,
const size_t  target_node_id,
const size_t  tid,
const synindex  syn_id,
const size_t  lcid 
) const

◆ get_target_node_id()

size_t nest::ConnectionManager::get_target_node_id ( const size_t  tid,
const synindex  syn_id,
const size_t  lcid 
) const
inline

References connections_.

◆ get_targets()

void nest::ConnectionManager::get_targets ( const std::vector< size_t > &  sources,
const size_t  syn_id,
const std::string &  post_synaptic_element,
std::vector< std::vector< size_t > > &  targets 
)

References connections_, nest::SourceTable::find_first_source(), nest::VPManager::get_num_threads(), nest::kernel(), source_table_, and nest::KernelManager::vp_manager.

Referenced by nest::SPManager::delete_synapses_from_pre().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_third_conn_builder()

ThirdOutBuilder * nest::ConnectionManager::get_third_conn_builder ( const std::string &  name,
NodeCollectionPTR  sources,
NodeCollectionPTR  targets,
ThirdInBuilder *  third_in,
const Dictionary &  conn_spec,
const std::vector< Dictionary > &  syn_specs 
)

Obtain builder for bipartite connections.

References Dictionary::get(), Dictionary::known(), thirdconnbuilder_factories_, and thirdconnruledict_.

Here is the call graph for this function:

◆ get_user_set_delay_extrema()

bool nest::ConnectionManager::get_user_set_delay_extrema ( ) const

References delay_checkers_.

Referenced by nest::KernelManager::change_number_of_threads(), and update_delay_extrema_().

Here is the caller graph for this function:

◆ has_primary_connections()

bool nest::ConnectionManager::has_primary_connections ( ) const
inline

◆ increase_connection_count()

void nest::ConnectionManager::increase_connection_count ( const size_t  tid,
const synindex  syn_id 
)
private

Increases the connection count.

References nest::MAX_LCID, and num_connections_.

Referenced by connect_(), connect_from_device_(), and connect_to_device_().

Here is the caller graph for this function:

◆ initialize()

void nest::ConnectionManager::initialize ( const bool  adjust_number_of_threads_or_rng_only)
overridevirtual

Prepare manager for operation.

After this method has completed, the manager should be completely initialized and "ready for action".

Note
Initialization of any given manager may depend on other managers having been initialized before. KernelManager::initialize() is responsible for calling the initialization routines on the specific managers in correct order.
Parameters
adjust_number_of_threads_or_rng_onlyPass true if calling from kernel_manager::change_number_of_threads() or RandomManager::get_status() to limit operations to those necessary for thread adjustment or switch or re-seeding of RNG.
See also
finalize()

Implements nest::ManagerInterface.

References check_primary_connections_, check_secondary_connections_, compressed_spike_data_, connections_, connections_have_changed_, delay_checkers_, get_connections_has_been_called_, nest::ModelManager::get_num_connection_models(), nest::VPManager::get_num_threads(), nest::VPManager::get_thread_id(), has_primary_connections_, nest::SourceTable::initialize(), nest::TargetTable::initialize(), nest::TargetTableDevices::initialize(), nest::PerThreadBoolIndicator::initialize(), keep_source_table_, nest::kernel(), max_delay_, min_delay_, nest::KernelManager::model_manager, num_connections_, nest::Stopwatch< detailed_timer, threaded_timer >::reset(), secondary_connections_exist_, secondary_recv_buffer_pos_, source_table_, stdp_eps_, sw_construction_connect, target_table_, target_table_devices_, use_compressed_spikes_, and nest::KernelManager::vp_manager.

Here is the call graph for this function:

◆ initialize_iteration_state()

void nest::ConnectionManager::initialize_iteration_state ( )

Set iteration_state_ entries for all threads to beginning of compressed_spike_data_map_.

References nest::SourceTable::compressed_spike_data_map_, nest::VPManager::get_num_threads(), iteration_state_, nest::kernel(), source_table_, and nest::KernelManager::vp_manager.

Referenced by nest::SimulationManager::update_connection_infrastructure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_source_table_cleared()

bool nest::ConnectionManager::is_source_table_cleared ( ) const
inline

Returns true if source table was cleared.

References nest::SourceTable::is_cleared(), and source_table_.

Referenced by get_connections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ no_targets_to_process()

void nest::ConnectionManager::no_targets_to_process ( const size_t  tid)
inline

References nest::SourceTable::no_targets_to_process(), and source_table_.

Referenced by nest::EventDeliveryManager::collocate_target_data_buffers_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepare_target_table()

void nest::ConnectionManager::prepare_target_table ( const size_t  tid)
inline

References nest::TargetTable::prepare(), and target_table_.

Referenced by nest::EventDeliveryManager::gather_target_data(), and nest::EventDeliveryManager::gather_target_data_compressed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_conn_builder()

template<typename ConnBuilder >
void nest::ConnectionManager::register_conn_builder ( const std::string &  name)

Add a connectivity rule, i.e.

the respective ConnBuilderFactory.

References connbuilder_factories_, connruledict_, and Dictionary::known().

Here is the call graph for this function:

◆ register_third_conn_builder()

template<typename ThirdConnBuilder >
void nest::ConnectionManager::register_third_conn_builder ( const std::string &  name)

Add a connectivity rule, i.e.

the respective ConnBuilderFactory.

References Dictionary::known(), thirdconnbuilder_factories_, and thirdconnruledict_.

Here is the call graph for this function:

◆ reject_last_target_data()

void nest::ConnectionManager::reject_last_target_data ( const size_t  tid)
inline

References nest::SourceTable::reject_last_target_data(), and source_table_.

Referenced by nest::EventDeliveryManager::collocate_target_data_buffers_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_disabled_connections_()

void nest::ConnectionManager::remove_disabled_connections_ ( const size_t  tid)
private

Removes disabled connections (of structural plasticity)

References connections_, nest::SourceTable::remove_disabled_sources(), source_table_, and use_compressed_spikes_.

Referenced by sort_connections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_source_table_entry_point()

void nest::ConnectionManager::reset_source_table_entry_point ( const size_t  tid)
inline

References nest::SourceTable::reset_entry_point(), and source_table_.

Referenced by nest::EventDeliveryManager::gather_target_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_connections()

void nest::ConnectionManager::resize_connections ( )

References nest::VPManager::assert_thread_parallel(), connections_, nest::kernel(), nest::SourceTable::resize_sources(), nest::TargetTableDevices::resize_to_number_of_synapse_types(), source_table_, target_table_devices_, and nest::KernelManager::vp_manager.

Referenced by nest::ModelManager::copy_connection_model_(), and nest::ModelManager::register_specific_connection_model_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_target_table_devices_to_number_of_neurons()

void nest::ConnectionManager::resize_target_table_devices_to_number_of_neurons ( )
inline

References nest::TargetTableDevices::resize_to_number_of_neurons(), and target_table_devices_.

Referenced by nest::NodeManager::add_node().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize_target_table_devices_to_number_of_synapse_types()

void nest::ConnectionManager::resize_target_table_devices_to_number_of_synapse_types ( )
inline

References nest::TargetTableDevices::resize_to_number_of_synapse_types(), and target_table_devices_.

Referenced by nest::NodeManager::add_node().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restore_source_table_entry_point()

void nest::ConnectionManager::restore_source_table_entry_point ( const size_t  tid)
inline

References nest::SourceTable::restore_entry_point(), and source_table_.

Referenced by nest::EventDeliveryManager::gather_target_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restructure_connection_tables()

void nest::ConnectionManager::restructure_connection_tables ( const size_t  tid)
inline

Deletes TargetTable and resets processed flags of SourceTable.

This function must be called if connections are created after connections have been communicated previously. It basically restores the connection infrastructure to a state where all information only exists on the postsynaptic side.

References nest::TargetTable::clear(), nest::SourceTable::is_cleared(), nest::SourceTable::reset_processed_flags(), source_table_, and target_table_.

Referenced by nest::SimulationManager::update_connection_infrastructure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_source_table_entry_point()

void nest::ConnectionManager::save_source_table_entry_point ( const size_t  tid)
inline

References nest::SourceTable::save_entry_point(), and source_table_.

Referenced by nest::EventDeliveryManager::collocate_target_data_buffers_(), and nest::EventDeliveryManager::gather_target_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ secondary_connections_exist()

bool nest::ConnectionManager::secondary_connections_exist ( ) const
inline

◆ send()

void nest::ConnectionManager::send ( const size_t  tid,
const synindex  syn_id,
const size_t  lcid,
const std::vector< ConnectorModel * > &  cm,
Event &  e 
)
inline

References connections_.

Referenced by nest::EventDeliveryManager::deliver_events_().

Here is the caller graph for this function:

◆ send_from_device()

void nest::ConnectionManager::send_from_device ( const size_t  tid,
const size_t  ldid,
Event &  e 
)
inline

Send event e to all targets of source device ldid (local device id)

References nest::kernel(), nest::TargetTableDevices::send_from_device(), and target_table_devices_.

Referenced by nest::EventDeliveryManager::send_local_(), and nest::EventDeliveryManager::send_local_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_local()

void nest::ConnectionManager::send_local ( size_t  t,
Node &  source,
Event &  e 
)

Send event e to all targets of node source on thread t.

◆ send_to_devices() [1/2]

void nest::ConnectionManager::send_to_devices ( const size_t  tid,
const size_t  source_node_id,
Event &  e 
)
inline

Send event e to all device targets of source source_node_id.

References nest::kernel(), nest::TargetTableDevices::send_to_device(), and target_table_devices_.

Referenced by nest::EventDeliveryManager::send(), and nest::EventDeliveryManager::send_secondary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_to_devices() [2/2]

void nest::ConnectionManager::send_to_devices ( const size_t  tid,
const size_t  source_node_id,
SecondaryEvent &  e 
)
inline

References nest::kernel(), nest::TargetTableDevices::send_to_device(), and target_table_devices_.

Here is the call graph for this function:

◆ set_connections_have_changed()

void nest::ConnectionManager::set_connections_have_changed ( )

Sets flag indicating whether connection information needs to be communicated to true.

References connections_have_changed_, get_connections_has_been_called_, nest::kernel(), LOG, and nest::WARNING.

Referenced by connect(), connect_arrays(), nest::connect_layers(), connect_sonata(), connect_tripartite(), nest::SPManager::disconnect(), and nest::SPManager::update_structural_plasticity().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_source_has_more_targets()

void nest::ConnectionManager::set_source_has_more_targets ( const size_t  tid,
const synindex  syn_id,
const size_t  lcid,
const bool  more_targets 
)
inline

References connections_.

Referenced by nest::SourceTable::collect_compressible_sources(), and nest::SourceTable::get_next_target_data().

Here is the caller graph for this function:

◆ set_status()

void nest::ConnectionManager::set_status ( const Dictionary &  )
overridevirtual

Set the status of the manager.

See also
get_status()

Implements nest::ManagerInterface.

References delay_checkers_, nest::names::keep_source_table(), keep_source_table_, nest::kernel(), nest::names::max_delay(), nest::names::min_delay(), update_delay_extrema_(), nest::names::use_compressed_spikes(), and use_compressed_spikes_.

Here is the call graph for this function:

◆ set_stdp_eps()

void nest::ConnectionManager::set_stdp_eps ( const double  stdp_eps)

References nest::Time::get_resolution(), nest::INFO, LOG, and stdp_eps_.

Here is the call graph for this function:

◆ set_synapse_status()

void nest::ConnectionManager::set_synapse_status ( const size_t  source_node_id,
const size_t  target_node_id,
const size_t  tid,
const synindex  syn_id,
const size_t  lcid,
const Dictionary &  dict 
)

References nest::ModelManager::assert_valid_syn_id(), connections_, nest::ModelManager::get_connection_model(), nest::NodeManager::get_node_or_proxy(), nest::kernel(), nest::KernelManager::model_manager, nest::KernelManager::node_manager, nest::TargetTableDevices::set_synapse_status_from_device(), nest::TargetTableDevices::set_synapse_status_to_device(), and target_table_devices_.

Referenced by nest::set_connection_status(), and nest::set_connection_status().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sort_connections()

void nest::ConnectionManager::sort_connections ( const size_t  tid)

Sorts connections in the presynaptic infrastructure by increasing source node ID.

References connections_, nest::SourceTable::get_thread_local_sources(), nest::SourceTable::is_cleared(), remove_disabled_connections_(), source_table_, and use_compressed_spikes_.

Referenced by nest::SimulationManager::update_connection_infrastructure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ split_to_neuron_device_vectors_()

void nest::ConnectionManager::split_to_neuron_device_vectors_ ( const size_t  tid,
NodeCollectionPTR  nodecollection,
std::vector< size_t > &  neuron_node_ids,
std::vector< size_t > &  device_node_ids 
) const
private

Splits a TokenArray of node IDs to two vectors containing node IDs of neurons and node IDs of devices.

References nest::NodeManager::get_node_or_proxy(), nest::kernel(), and nest::KernelManager::node_manager.

Referenced by get_connections_from_sources_(), and get_connections_to_targets_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sync_has_primary_connections()

void nest::ConnectionManager::sync_has_primary_connections ( )

References nest::MPIManager::any_true(), has_primary_connections_, nest::kernel(), and nest::KernelManager::mpi_manager.

Referenced by nest::SimulationManager::update_connection_infrastructure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ trigger_update_weight()

void nest::ConnectionManager::trigger_update_weight ( const long  vt_node_id,
const std::vector< spikecounter > &  dopa_spikes,
const double  t_trig 
)

Triggered by volume transmitter in update.

Triggeres updates for all connectors of dopamine synapses that are registered with the volume transmitter with node_id vt_node_id.

References connections_, nest::VPManager::get_thread_id(), nest::kernel(), and nest::KernelManager::vp_manager.

Referenced by nest::volume_transmitter::update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unset_connections_have_changed()

void nest::ConnectionManager::unset_connections_have_changed ( )

Sets flag indicating whether connection information needs to be communicated to false.

References connections_have_changed_.

Referenced by nest::SimulationManager::update_connection_infrastructure().

Here is the caller graph for this function:

◆ update_delay_extrema_()

void nest::ConnectionManager::update_delay_extrema_ ( )
private

Update delay extrema to current values.

Note
This entails MPI communication.

References nest::MPIManager::communicate(), get_max_delay_time_(), get_min_delay_time_(), nest::MPIManager::get_rank(), nest::Time::get_resolution(), nest::Time::get_steps(), get_user_set_delay_extrema(), nest::kernel(), max_delay_, min_delay_, nest::KernelManager::mpi_manager, and nest::Time::pos_inf().

Referenced by get_connections(), get_status(), nest::SimulationManager::prepare(), and set_status().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ use_compressed_spikes()

bool nest::ConnectionManager::use_compressed_spikes ( ) const
inline

Returns whether spikes should be compressed.

Implies that connections will be sorted by source.

References use_compressed_spikes_.

Referenced by nest::EventDeliveryManager::deliver_events_().

Here is the caller graph for this function:

◆ valid_connection_rule()

bool nest::ConnectionManager::valid_connection_rule ( std::string  rule_name)
inline

References connruledict_, and Dictionary::known().

Referenced by nest::SPManager::disconnect().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ SimulationManager

friend class SimulationManager
friend

Member Data Documentation

◆ buffer_pos_of_source_node_id_syn_id_

std::map< size_t, size_t > nest::ConnectionManager::buffer_pos_of_source_node_id_syn_id_
private

◆ check_primary_connections_

PerThreadBoolIndicator nest::ConnectionManager::check_primary_connections_
private

Check for primary connections (spikes) on each thread.

Referenced by connect_(), and initialize().

◆ check_secondary_connections_

PerThreadBoolIndicator nest::ConnectionManager::check_secondary_connections_
private

Check for secondary connections (e.g., gap junctions) on each thread.

Referenced by connect_(), and initialize().

◆ compressed_spike_data_

std::vector< std::vector< std::vector< SpikeData > > > nest::ConnectionManager::compressed_spike_data_
private

A structure to hold "unpacked" spikes on the postsynaptic side if spike compression is enabled.

Internally arranged in a 3d structure: synapses|sources|target_threads

Referenced by collect_compressed_spike_data(), fill_target_buffer(), finalize(), get_compressed_spike_data(), and initialize().

◆ connbuilder_factories_

std::vector< GenericBipartiteConnBuilderFactory* > nest::ConnectionManager::connbuilder_factories_
private

ConnBuilder factories, indexed by connruledict_ elements.

Referenced by finalize(), get_conn_builder(), and register_conn_builder().

◆ connections_

◆ connections_have_changed_

bool nest::ConnectionManager::connections_have_changed_
private

True if new connections have been created since startup or last call to simulate.

Referenced by connections_have_changed(), initialize(), set_connections_have_changed(), and unset_connections_have_changed().

◆ connruledict_

Dictionary nest::ConnectionManager::connruledict_
private

◆ delay_checkers_

std::vector< DelayChecker > nest::ConnectionManager::delay_checkers_
private

◆ get_connections_has_been_called_

bool nest::ConnectionManager::get_connections_has_been_called_
private

true if GetConnections has been called.

Referenced by get_connections(), initialize(), and set_connections_have_changed().

◆ has_primary_connections_

bool nest::ConnectionManager::has_primary_connections_
private

Whether primary connections (spikes) exist.

Referenced by connect_(), has_primary_connections(), initialize(), and sync_has_primary_connections().

◆ iteration_state_

std::vector< std::pair< size_t, std::map< size_t, CSDMapEntry >::const_iterator > > nest::ConnectionManager::iteration_state_
private

For each thread, store (syn_id, compressed_spike_data_map_::iterator) pair for next iteration while filling target buffers.

Referenced by fill_target_buffer(), and initialize_iteration_state().

◆ keep_source_table_

bool nest::ConnectionManager::keep_source_table_
private

Whether to keep source table after connection setup is complete.

Referenced by clean_source_table(), clear_source_table(), get_keep_source_table(), get_status(), initialize(), and set_status().

◆ max_delay_

long nest::ConnectionManager::max_delay_
private

Value of the largest delay in the network in steps.

Referenced by get_max_delay(), get_status(), initialize(), and update_delay_extrema_().

◆ min_delay_

long nest::ConnectionManager::min_delay_
private

Value of the smallest delay in the network.

Referenced by get_min_delay(), get_status(), initialize(), and update_delay_extrema_().

◆ num_connections_

std::vector< std::vector< size_t > > nest::ConnectionManager::num_connections_
private

A structure to count the number of synapses of a specific type.

Arranged in a 2d structure: threads|synapsetypes.

Referenced by disconnect(), get_num_connections(), get_num_connections(), increase_connection_count(), and initialize().

◆ secondary_connections_exist_

bool nest::ConnectionManager::secondary_connections_exist_
private

Whether secondary connections (e.g., gap junctions) exist.

Referenced by check_secondary_connections_exist(), connect_(), initialize(), and secondary_connections_exist().

◆ secondary_recv_buffer_pos_

std::vector< std::vector< std::vector< size_t > > > nest::ConnectionManager::secondary_recv_buffer_pos_
private

Stores absolute position in receive buffer of secondary events.

structure: threads|synapses|position

Referenced by compute_compressed_secondary_recv_buffer_positions(), deliver_secondary_events(), finalize(), get_secondary_recv_buffer_position(), and initialize().

◆ source_table_

◆ stdp_eps_

double nest::ConnectionManager::stdp_eps_
private

Maximum distance between (double) spike times in STDP that is still considered 0.

See issue #894

Referenced by get_stdp_eps(), initialize(), and set_stdp_eps().

◆ sw_construction_connect

◆ target_table_

TargetTable nest::ConnectionManager::target_table_
private

A structure to hold the information about targets for each neuron on the presynaptic side.

Internally arranged in a 3d structure: threads|localnodes|targets

Referenced by add_target(), compress_secondary_send_buffer_pos(), finalize(), get_remote_targets_of_local_node(), get_secondary_send_buffer_positions(), initialize(), prepare_target_table(), and restructure_connection_tables().

◆ target_table_devices_

◆ thirdconnbuilder_factories_

std::vector< GenericThirdConnBuilderFactory* > nest::ConnectionManager::thirdconnbuilder_factories_
private

Third-factor ConnBuilder factories, indexed by thirdconnruledict_ elements.

Referenced by finalize(), get_third_conn_builder(), and register_third_conn_builder().

◆ thirdconnruledict_

Dictionary nest::ConnectionManager::thirdconnruledict_
private

Dictionary for third-factor connection rules.

Referenced by finalize(), get_third_conn_builder(), and register_third_conn_builder().

◆ use_compressed_spikes_

bool nest::ConnectionManager::use_compressed_spikes_
private

Whether to use spike compression; if a neuron has targets on multiple threads of a process, this switch makes sure that only a single packet is sent to the process instead of one packet per target thread; implies sort_connections_by_source_ = true; for more details see the discussion and sketch in https://github.com/nest/nest-simulator/pull/1338.

Referenced by collect_compressed_spike_data(), find_connection(), get_status(), initialize(), remove_disabled_connections_(), set_status(), sort_connections(), and use_compressed_spikes().


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