|
24 | 24 | #pragma once |
25 | 25 |
|
26 | 26 | #include "AllEdges.h" |
27 | | -#include "AllSpikingNeurons.h" |
28 | | -#include "AllSpikingSynapses.h" |
29 | 27 | #include "AllVertices.h" |
30 | 28 | #include "EdgeIndexMap.h" |
31 | 29 | #include "Layout.h" |
@@ -67,46 +65,49 @@ class Connections { |
67 | 65 | /// Registered to OperationManager as Operation::printParameters |
68 | 66 | virtual void printParameters() const = 0; |
69 | 67 |
|
| 68 | + /// Registers history variables for recording during simulation |
| 69 | + virtual void registerHistoryVariables() = 0; |
| 70 | + |
70 | 71 | /// Update the connections status in every epoch. |
71 | 72 | /// |
72 | | - /// @param neurons The Neuron list to search from. |
73 | 73 | /// @return true if successful, false otherwise. |
74 | | - virtual bool updateConnections(AllVertices &vertices); |
| 74 | + virtual bool updateConnections(); |
75 | 75 |
|
76 | 76 | /// Cereal serialization method |
77 | 77 | template <class Archive> void serialize(Archive &archive); |
78 | 78 |
|
79 | 79 | #if defined(USE_GPU) |
80 | 80 | public: |
81 | | - /// Update the weight of the Synapses in the simulation. |
| 81 | + /// Update the weight of the edges in the simulation. |
82 | 82 | /// Note: Platform Dependent. |
83 | 83 | /// |
84 | 84 | /// @param numVertices number of vertices to update. |
85 | | - /// @param neurons the Neuron list to search from. |
86 | | - /// @param synapses the Synapse list to search from. |
| 85 | + /// @param vertices the vertex list to search from. |
| 86 | + /// @param edges the edge list to search from. |
87 | 87 | /// @param allVerticesDevice GPU address of the allVertices struct on device memory. |
88 | | - /// @param allEdgesDevice GPU address of the allEdges struct on device memory. |
89 | | - /// @param layout Layout information of the neural network. |
90 | | - virtual void updateSynapsesWeights(int numVertices, AllVertices &vertices, AllEdges &synapses, |
91 | | - AllSpikingNeuronsDeviceProperties *allVerticesDevice, |
92 | | - AllSpikingSynapsesDeviceProperties *allEdgesDevice, |
93 | | - Layout &layout); |
| 88 | + /// @param allEdgesDevice GPU address of the allEdges struct on device memory. |
| 89 | + /// @param layout Layout information of the graph network. |
| 90 | + virtual void updateEdgesWeights(int numVertices, AllVertices &vertices, AllEdges &edges, |
| 91 | + AllVerticesDeviceProperties *allVerticesDevice, |
| 92 | + AllEdgesDeviceProperties *allEdgesDevice, Layout &layout); |
94 | 93 | #else |
95 | 94 | public: |
96 | | - /// Update the weight of the Synapses in the simulation. |
| 95 | + /// Update the weight of the edges in the simulation. |
97 | 96 | /// Note: Platform Dependent. |
98 | | - virtual void updateSynapsesWeights(); |
| 97 | + virtual void updateEdgesWeights(); |
99 | 98 |
|
100 | 99 | #endif // USE_GPU |
101 | 100 |
|
102 | 101 | protected: |
103 | 102 | unique_ptr<AllEdges> edges_; |
| 103 | + /// TODO: Rename to edgeIndexMap_ since this is a base class |
104 | 104 | unique_ptr<EdgeIndexMap> synapseIndexMap_; |
105 | 105 |
|
106 | 106 | log4cplus::Logger fileLogger_; |
107 | 107 | log4cplus::Logger edgeLogger_; |
108 | 108 | }; |
109 | 109 |
|
| 110 | +/// TODO: Rename to synapseIndexMap since this is a base class |
110 | 111 | /// Cereal serialization method |
111 | 112 | template <class Archive> void Connections::serialize(Archive &archive) |
112 | 113 | { |
|
0 commit comments