This data structure stores the connections between local neurons and devices. More...
#include <target_table_devices.h>
Public Member Functions | |
| TargetTableDevices () | |
| ~TargetTableDevices () | |
| void | initialize () |
| Initialize data structures. | |
| void | finalize () |
| Delete data structure. | |
| void | add_connection_to_device (Node &source, Node &target, const size_t s_node_id, const size_t tid, const synindex syn_id, const Dictionary &p, const double d, const double w) |
| Adds a connection from the neuron source to the device target. | |
| void | add_connection_from_device (Node &source, Node &target, const size_t tid, const synindex syn_id, const Dictionary &p, const double d, const double w) |
| Adds a connection from the device source to the neuron target. | |
| void | send_to_device (const size_t tid, const size_t s_node_id, Event &e, const std::vector< ConnectorModel * > &cm) |
| Sends a spike event to all targets of the source neuron. | |
| void | send_to_device (const size_t tid, const size_t s_node_id, SecondaryEvent &e, const std::vector< ConnectorModel * > &cm) |
| void | send_from_device (const size_t tid, const size_t ldid, Event &e, const std::vector< ConnectorModel * > &cm) |
| Sends a spike event to all targets of the source device. | |
| void | resize_to_number_of_neurons () |
| Resizes vectors according to number of local nodes. | |
| void | resize_to_number_of_synapse_types () |
| Resizes vectors according to number of available synapse types. | |
| void | get_connections_to_devices_ (const size_t requested_source_node_id, const size_t requested_target_node_id, const size_t tid, const synindex synapse_id, const long synapse_label, std::deque< ConnectionID > &conns) const |
| Returns all connections from neurons to devices. | |
| void | get_connections_to_device_for_lid_ (const size_t lid, const size_t requested_target_node_id, const size_t tid, const synindex syn_id, const long synapse_label, std::deque< ConnectionID > &conns) const |
| Returns all connections from particular neuron to devices. | |
| void | get_connections_from_devices_ (const size_t requested_source_node_id, const size_t requested_target_node_id, const size_t tid, const synindex synapse_id, const long synapse_label, std::deque< ConnectionID > &conns) const |
| Returns all connections from devices to neurons. | |
| void | get_connections (const size_t requested_source_node_id, const size_t requested_target_node_id, const size_t tid, const synindex synapse_id, const long synapse_label, std::deque< ConnectionID > &conns) const |
| Returns all connections between neurons and devices. | |
| void | get_synapse_status_to_device (const size_t tid, const size_t source_node_id, const synindex syn_id, Dictionary &dict, const size_t lcid) const |
| Returns synapse status of connection from neuron to device. | |
| void | get_synapse_status_from_device (const size_t tid, const size_t ldid, const synindex syn_id, Dictionary &dict, const size_t lcid) const |
| Returns synapse status of connection from device to neuron. | |
| void | set_synapse_status_to_device (const size_t tid, const size_t source_node_id, const synindex syn_id, ConnectorModel &cm, const Dictionary &dict, const size_t lcid) |
| Sets synapse status of connection from neuron to device. | |
| void | set_synapse_status_from_device (const size_t tid, const size_t ldid, const synindex syn_id, ConnectorModel &cm, const Dictionary &dict, const size_t lcid) |
| Sets synapse status of connection from device to neuron. | |
| bool | is_device_connected (size_t tid, size_t lcid) const |
| Checks if the device has any connections in this thread. | |
Private Attributes | |
| std::vector< std::vector< std::vector< ConnectorBase * > > > | target_to_devices_ |
| 3d structure storing connections from neurons to devices | |
| std::vector< std::vector< std::vector< ConnectorBase * > > > | target_from_devices_ |
| 3d structure storing connections from devices to neurons | |
| std::vector< std::vector< size_t > > | sending_devices_node_ids_ |
| 3d structure storing node IDs of sending devices (necessary for get_connections) | |
This data structure stores the connections between local neurons and devices.
The core structure is a two dimensional vector, which is arranged as follows:
| nest::TargetTableDevices::TargetTableDevices | ( | ) |
| nest::TargetTableDevices::~TargetTableDevices | ( | ) |
|
inline |
Adds a connection from the device source to the neuron target.
References nest::ConnectorModel::add_connection(), nest::ModelManager::get_connection_model(), nest::kernel(), nest::KernelManager::model_manager, sending_devices_node_ids_, and target_from_devices_.
Referenced by nest::ConnectionManager::connect_from_device_().
|
inline |
Adds a connection from the neuron source to the device target.
References nest::ConnectorModel::add_connection(), nest::ModelManager::get_connection_model(), nest::kernel(), nest::KernelManager::model_manager, nest::VPManager::node_id_to_lid(), target_to_devices_, and nest::KernelManager::vp_manager.
Referenced by nest::ConnectionManager::connect_to_device_().
| void nest::TargetTableDevices::finalize | ( | ) |
Delete data structure.
References sending_devices_node_ids_, target_from_devices_, and target_to_devices_.
Referenced by nest::ConnectionManager::finalize().
| void nest::TargetTableDevices::get_connections | ( | const size_t | requested_source_node_id, |
| const size_t | requested_target_node_id, | ||
| const size_t | tid, | ||
| const synindex | synapse_id, | ||
| const long | synapse_label, | ||
| std::deque< ConnectionID > & | conns | ||
| ) | const |
Returns all connections between neurons and devices.
References get_connections_from_devices_(), and get_connections_to_devices_().
Referenced by nest::ConnectionManager::get_connections_(), and nest::ConnectionManager::get_connections_from_sources_().
| void nest::TargetTableDevices::get_connections_from_devices_ | ( | const size_t | requested_source_node_id, |
| const size_t | requested_target_node_id, | ||
| const size_t | tid, | ||
| const synindex | synapse_id, | ||
| const long | synapse_label, | ||
| std::deque< ConnectionID > & | conns | ||
| ) | const |
Returns all connections from devices to neurons.
References nest::NodeManager::get_node_or_proxy(), nest::kernel(), nest::KernelManager::node_manager, sending_devices_node_ids_, and target_from_devices_.
Referenced by get_connections(), nest::ConnectionManager::get_connections_from_sources_(), and nest::ConnectionManager::get_connections_to_targets_().
| void nest::TargetTableDevices::get_connections_to_device_for_lid_ | ( | const size_t | lid, |
| const size_t | requested_target_node_id, | ||
| const size_t | tid, | ||
| const synindex | syn_id, | ||
| const long | synapse_label, | ||
| std::deque< ConnectionID > & | conns | ||
| ) | const |
Returns all connections from particular neuron to devices.
References nest::kernel(), nest::VPManager::lid_to_node_id(), target_to_devices_, and nest::KernelManager::vp_manager.
Referenced by get_connections_to_devices_().
| void nest::TargetTableDevices::get_connections_to_devices_ | ( | const size_t | requested_source_node_id, |
| const size_t | requested_target_node_id, | ||
| const size_t | tid, | ||
| const synindex | synapse_id, | ||
| const long | synapse_label, | ||
| std::deque< ConnectionID > & | conns | ||
| ) | const |
Returns all connections from neurons to devices.
References get_connections_to_device_for_lid_(), nest::kernel(), nest::VPManager::node_id_to_lid(), target_to_devices_, and nest::KernelManager::vp_manager.
Referenced by get_connections(), nest::ConnectionManager::get_connections_from_sources_(), and nest::ConnectionManager::get_connections_to_targets_().
|
inline |
Returns synapse status of connection from device to neuron.
References target_from_devices_.
Referenced by nest::ConnectionManager::get_synapse_status().
|
inline |
Returns synapse status of connection from neuron to device.
References nest::kernel(), nest::VPManager::node_id_to_lid(), target_to_devices_, and nest::KernelManager::vp_manager.
Referenced by nest::ConnectionManager::get_synapse_status().
| void nest::TargetTableDevices::initialize | ( | ) |
Initialize data structures.
References nest::VPManager::get_num_threads(), nest::kernel(), sending_devices_node_ids_, target_from_devices_, target_to_devices_, and nest::KernelManager::vp_manager.
Referenced by nest::ConnectionManager::initialize().
|
inline |
Checks if the device has any connections in this thread.
References target_from_devices_, and nest::UNLABELED_CONNECTION.
Referenced by nest::ConnectionManager::get_device_connected().
| void nest::TargetTableDevices::resize_to_number_of_neurons | ( | ) |
Resizes vectors according to number of local nodes.
References nest::VPManager::get_thread_id(), nest::kernel(), sending_devices_node_ids_, target_from_devices_, target_to_devices_, and nest::KernelManager::vp_manager.
Referenced by nest::ConnectionManager::resize_target_table_devices_to_number_of_neurons().
| void nest::TargetTableDevices::resize_to_number_of_synapse_types | ( | ) |
Resizes vectors according to number of available synapse types.
References nest::VPManager::assert_thread_parallel(), nest::VPManager::get_thread_id(), nest::kernel(), target_from_devices_, target_to_devices_, and nest::KernelManager::vp_manager.
Referenced by nest::ConnectionManager::resize_connections(), and nest::ConnectionManager::resize_target_table_devices_to_number_of_synapse_types().
|
inline |
Sends a spike event to all targets of the source device.
References target_from_devices_.
Referenced by nest::ConnectionManager::send_from_device().
|
inline |
Sends a spike event to all targets of the source neuron.
References nest::kernel(), nest::VPManager::node_id_to_lid(), target_to_devices_, and nest::KernelManager::vp_manager.
Referenced by nest::ConnectionManager::send_to_devices(), and nest::ConnectionManager::send_to_devices().
|
inline |
References nest::kernel(), nest::VPManager::node_id_to_lid(), target_to_devices_, and nest::KernelManager::vp_manager.
|
inline |
Sets synapse status of connection from device to neuron.
References target_from_devices_.
Referenced by nest::ConnectionManager::set_synapse_status().
|
inline |
Sets synapse status of connection from neuron to device.
References nest::kernel(), nest::VPManager::node_id_to_lid(), target_to_devices_, and nest::KernelManager::vp_manager.
Referenced by nest::ConnectionManager::set_synapse_status().
|
private |
3d structure storing node IDs of sending devices (necessary for get_connections)
Referenced by add_connection_from_device(), finalize(), get_connections_from_devices_(), initialize(), and resize_to_number_of_neurons().
|
private |
3d structure storing connections from devices to neurons
Referenced by add_connection_from_device(), finalize(), get_connections_from_devices_(), get_synapse_status_from_device(), initialize(), is_device_connected(), resize_to_number_of_neurons(), resize_to_number_of_synapse_types(), send_from_device(), and set_synapse_status_from_device().
|
private |
3d structure storing connections from neurons to devices
Referenced by add_connection_to_device(), finalize(), get_connections_to_device_for_lid_(), get_connections_to_devices_(), get_synapse_status_to_device(), initialize(), resize_to_number_of_neurons(), resize_to_number_of_synapse_types(), send_to_device(), send_to_device(), and set_synapse_status_to_device().