#include <TaskHolder.h>
Public Member Functions | |
| TaskHolder (int thisTaskID, int primaryDestTaskID) | |
| ~TaskHolder () | |
| void | addReceivingTask (int) |
| void | printBuffers () |
| void | removeReceivingTask (int) |
| bool | sendSpikeMessages () |
| void | setMaxBufferSize (int maxSize) |
Private Member Functions | |
| TaskHolder (const TaskHolder &) | |
| TaskHolder | operator= (const TaskHolder &) |
Private Attributes | |
| int | thisTaskID |
| int | primaryDestinationID |
| vector< ConnectionHolder * > | spikeMessageBuffer [NUMBER_OF_DELAY_VALUES] |
| unsigned int | messageSpikeCount [NUMBER_OF_DELAY_VALUES] |
| unsigned int | maxBufferSize |
| unsigned int | bufferCounter |
| int * | destinationTaskIDs |
| int | numberOfTasks |
Friends | |
| class | Neuron |
Definition at line 42 of file TaskHolder.h.
|
||||||||||||
|
Constructor. Definition at line 37 of file TaskHolder.cpp. References bufferCounter, destinationTaskIDs, messageSpikeCount, numberOfTasks, primaryDestinationID, and thisTaskID. |
|
|
Destructor. Definition at line 60 of file TaskHolder.cpp. References destinationTaskIDs, numberOfTasks, and thisTaskID. |
|
|
Declare copy constructor private so it cannot be used inadvertently. |
|
|
Adds a receiving task to the task array. Done in this clunky way because the broadcast message function in pvm needs an integer array, not a vector, as one of its arguments. Definition at line 78 of file TaskHolder.cpp. References destinationTaskIDs, and numberOfTasks. |
|
|
Declare assignment private so it cannot be used. |
|
|
Debug method that prints out the contents of the spike message buffer. Definition at line 108 of file TaskHolder.cpp. References bufferCounter, messageSpikeCount, spikeMessageBuffer, and thisTaskID. |
|
|
Removes a receiving task from the task holder. Definition at line 127 of file TaskHolder.cpp. References destinationTaskIDs, numberOfTasks, primaryDestinationID, and thisTaskID. |
|
|
Sends spike messages to other tasks and this task. Definition at line 167 of file TaskHolder.cpp. References bufferCounter, destinationTaskIDs, SimulationClock::getTimeStep(), messageSpikeCount, numberOfTasks, primaryDestinationID, SpikeStreamSimulation::simulationClock, spikeMessageBuffer, and thisTaskID. |
|
|
Allocates memory for all the spike vectors to save incrementally increasing their size This maximum number is likely to be close to the number of neurons in the task since each of these could add a connection holder for any point in time. Definition at line 272 of file TaskHolder.cpp. References maxBufferSize, and spikeMessageBuffer. |
|
|
Neuron class needs access to some of the private data members so that it can copy its connection holders into this class when it fires. Definition at line 56 of file TaskHolder.h. |
|
|
Controls which is the current spike array. This is the spike array that will be sent when sendSpikes() is called. Definition at line 84 of file TaskHolder.h. Referenced by Neuron::fireNeuron(), printBuffers(), sendSpikeMessages(), and TaskHolder(). |
|
|
Array of task IDs of the tasks that will be sent the spike lists held in this task holder. There will be a main task id containing the other neuron groups that need to receive the spike list and there may also be tasks that need to receive the spike list for monitoring or archiving. This is stored as an integer array to make it simpler to send using pvm_mcast. Vector would have to be converted. Definition at line 91 of file TaskHolder.h. Referenced by addReceivingTask(), removeReceivingTask(), sendSpikeMessages(), TaskHolder(), and ~TaskHolder(). |
|
|
The maximum size of the arrays held in spikeArrays. This will be the number of neurons in the other task that the neurons in this task are connected to. Definition at line 80 of file TaskHolder.h. Referenced by setMaxBufferSize(). |
|
|
Records how many spikes are in each message buffer. This is different from the message buffer length, which holds how many Connection holders are in the message buffer. Each connection holder can hold many spikes so the spike count needs to be done separately. Definition at line 75 of file TaskHolder.h. Referenced by Neuron::fireNeuron(), printBuffers(), sendSpikeMessages(), and TaskHolder(). |
|
|
Size of the destination task id array. Definition at line 94 of file TaskHolder.h. Referenced by addReceivingTask(), removeReceivingTask(), sendSpikeMessages(), TaskHolder(), and ~TaskHolder(). |
|
|
The taskID of the primary destination for spike lists from this task. This should be another task processing neurons. Definition at line 66 of file TaskHolder.h. Referenced by Neuron::fireNeuron(), removeReceivingTask(), sendSpikeMessages(), and TaskHolder(). |
|
|
Array of vectors containing pointers to connection holders that hold the spike data that is to be sent. Definition at line 70 of file TaskHolder.h. Referenced by Neuron::fireNeuron(), printBuffers(), sendSpikeMessages(), and setMaxBufferSize(). |
|
|
Keep a record of this task here for error messages. Definition at line 62 of file TaskHolder.h. Referenced by printBuffers(), removeReceivingTask(), sendSpikeMessages(), TaskHolder(), and ~TaskHolder(). |
1.4.4