NEST main@f146f75
Loading...
Searching...
No Matches
nest::TargetTableDevices Class Reference

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_

Detailed Description

This data structure stores the connections between local neurons and devices.

The core structure is a two dimensional vector, which is arranged as follows:

  • first dim: threads
  • second dim: local nodes/neurons

Constructor & Destructor Documentation

◆ TargetTableDevices()

nest::TargetTableDevices::TargetTableDevices ( )

◆ ~TargetTableDevices()

nest::TargetTableDevices::~TargetTableDevices ( )

Member Function Documentation

◆ add_connection_from_device()

void nest::TargetTableDevices::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 )
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, numerics::nan, sending_devices_node_ids_, and target_from_devices_.

Here is the call graph for this function:

◆ add_connection_to_device()

void nest::TargetTableDevices::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 )
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, numerics::nan, nest::VPManager::node_id_to_lid(), target_to_devices_, and nest::KernelManager::vp_manager.

Here is the call graph for this function:

◆ finalize()

void nest::TargetTableDevices::finalize ( )

Delete data structure.

References sending_devices_node_ids_, target_from_devices_, and target_to_devices_.

◆ get_connections()

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_().

Here is the call graph for this function:

◆ get_connections_from_devices_()

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().

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

◆ get_connections_to_device_for_lid_()

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_().

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

◆ 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().

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

◆ get_synapse_status_from_device()

void nest::TargetTableDevices::get_synapse_status_from_device ( const size_t tid,
const size_t ldid,
const synindex syn_id,
Dictionary & dict,
const size_t lcid ) const
inline

Returns synapse status of connection from device to neuron.

References target_from_devices_.

◆ get_synapse_status_to_device()

void nest::TargetTableDevices::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
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.

Here is the call graph for this function:

◆ initialize()

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.

Here is the call graph for this function:

◆ is_device_connected()

bool nest::TargetTableDevices::is_device_connected ( size_t tid,
size_t lcid ) const
inline

Checks if the device has any connections in this thread.

References target_from_devices_, and nest::UNLABELED_CONNECTION.

◆ resize_to_number_of_neurons()

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.

Here is the call graph for this function:

◆ resize_to_number_of_synapse_types()

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.

Here is the call graph for this function:

◆ send_from_device()

void nest::TargetTableDevices::send_from_device ( const size_t tid,
const size_t ldid,
Event & e,
const std::vector< ConnectorModel * > & cm )
inline

Sends a spike event to all targets of the source device.

References target_from_devices_.

◆ send_to_device() [1/2]

void nest::TargetTableDevices::send_to_device ( const size_t tid,
const size_t s_node_id,
Event & e,
const std::vector< ConnectorModel * > & cm )
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.

Here is the call graph for this function:

◆ send_to_device() [2/2]

void nest::TargetTableDevices::send_to_device ( const size_t tid,
const size_t s_node_id,
SecondaryEvent & e,
const std::vector< ConnectorModel * > & cm )
inline

References nest::kernel(), nest::VPManager::node_id_to_lid(), target_to_devices_, and nest::KernelManager::vp_manager.

Here is the call graph for this function:

◆ set_synapse_status_from_device()

void nest::TargetTableDevices::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 )
inline

Sets synapse status of connection from device to neuron.

References target_from_devices_.

◆ set_synapse_status_to_device()

void nest::TargetTableDevices::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 )
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.

Here is the call graph for this function:

Member Data Documentation

◆ sending_devices_node_ids_

std::vector< std::vector< size_t > > nest::TargetTableDevices::sending_devices_node_ids_
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().

◆ target_from_devices_

std::vector< std::vector< std::vector< ConnectorBase* > > > nest::TargetTableDevices::target_from_devices_
private

◆ target_to_devices_

std::vector< std::vector< std::vector< ConnectorBase* > > > nest::TargetTableDevices::target_to_devices_
private

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