Skip to content

Commit f023210

Browse files
author
Divya Kamath
committed
Removed const from BGSIZE function parameters
1 parent 5719d11 commit f023210

21 files changed

+100
-107
lines changed

Simulator/Edges/AllEdges.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void AllEdges::setupEdges(int numVertices, int maxEdges)
9090
///
9191
/// @param input istream to read from.
9292
/// @param iEdg Index of the edge to set.
93-
void AllEdges::readEdge(istream &input, const BGSIZE iEdg)
93+
void AllEdges::readEdge(istream &input, BGSIZE iEdg)
9494
{
9595
int synapse_type(0);
9696

@@ -113,7 +113,7 @@ void AllEdges::readEdge(istream &input, const BGSIZE iEdg)
113113
///
114114
/// @param output stream to print out to.
115115
/// @param iEdg Index of the edge to print out.
116-
void AllEdges::writeEdge(ostream &output, const BGSIZE iEdg) const
116+
void AllEdges::writeEdge(ostream &output, BGSIZE iEdg) const
117117
{
118118
output << sourceVertexIndex_[iEdg] << ends;
119119
output << destVertexIndex_[iEdg] << ends;
@@ -238,7 +238,7 @@ void AllEdges::advanceEdges(AllVertices &vertices, EdgeIndexMap &edgeIndexMap)
238238
///
239239
/// @param iVert Index of a vertex to remove from.
240240
/// @param iEdg Index of a edge to remove.
241-
void AllEdges::eraseEdge(int iVert, const BGSIZE iEdg)
241+
void AllEdges::eraseEdge(int iVert, BGSIZE iEdg)
242242
{
243243
edgeCounts_[iVert]--;
244244
inUse_[iEdg] = false;

Simulator/Edges/AllEdges.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class AllEdges {
5050
/// @param destVertex Coordinates of the destination Vertex.
5151
/// @param deltaT Inner simulation step duration.
5252
/// @param type Type of the Edge to create.
53-
virtual void createEdge(const BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
53+
virtual void createEdge(BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
5454
edgeType type)
5555
= 0;
5656

@@ -76,13 +76,13 @@ class AllEdges {
7676
///
7777
/// @param input istream to read from.
7878
/// @param iEdg Index of the edge to set.
79-
virtual void readEdge(istream &input, const BGSIZE iEdg);
79+
virtual void readEdge(istream &input, BGSIZE iEdg);
8080

8181
/// Write the edge data to the stream.
8282
///
8383
/// @param output stream to print out to.
8484
/// @param iEdg Index of the edge to print out.
85-
virtual void writeEdge(ostream &output, const BGSIZE iEdg) const;
85+
virtual void writeEdge(ostream &output, BGSIZE iEdg) const;
8686

8787
/// Returns an appropriate edgeType object for the given integer.
8888
///
@@ -185,13 +185,13 @@ class AllEdges {
185185
///
186186
/// @param iEdg Index of the Edge to connect to.
187187
/// @param vertices The Vertex list to search from.
188-
virtual void advanceEdge(const BGSIZE iEdg, AllVertices &vertices) = 0;
188+
virtual void advanceEdge(BGSIZE iEdg, AllVertices &vertices) = 0;
189189

190190
/// Remove a edge from the network.
191191
///
192192
/// @param neuronIndex Index of a vertex to remove from.
193193
/// @param iEdg Index of a edge to remove.
194-
virtual void eraseEdge(int neuronIndex, const BGSIZE iEdg);
194+
virtual void eraseEdge(int neuronIndex, BGSIZE iEdg);
195195
#endif // defined(USE_GPU)
196196

197197
/// The location of the edge.

Simulator/Edges/NG911/All911Edges.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void All911Edges::setupEdges()
3131
}
3232
}
3333

34-
void All911Edges::createEdge(const BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
34+
void All911Edges::createEdge(BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
3535
edgeType type)
3636
{
3737
inUse_[iEdg] = true;
@@ -101,7 +101,7 @@ void All911Edges::advanceEdges(AllVertices &vertices, EdgeIndexMap &edgeIndexMap
101101
///
102102
/// @param iEdg Index of the edge to connect to.
103103
/// @param vertices The vertex list to search from.
104-
void All911Edges::advance911Edge(const BGSIZE iEdg, All911Vertices &vertices)
104+
void All911Edges::advance911Edge(BGSIZE iEdg, All911Vertices &vertices)
105105
{
106106
// edge
107107
// source node --> destination node

Simulator/Edges/NG911/All911Edges.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class All911Edges : public AllEdges {
5757
/// @param destVertex Coordinates of the destination Vertex.
5858
/// @param deltaT Inner simulation step duration.
5959
/// @param type Type of the Edge to create.
60-
virtual void createEdge(const BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
60+
virtual void createEdge(BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
6161
edgeType type) override;
6262

6363
protected:
@@ -93,10 +93,10 @@ class All911Edges : public AllEdges {
9393
///
9494
/// @param iEdg Index of the Edge to connect to.
9595
/// @param vertices The Neuron list to search from.
96-
void advance911Edge(const BGSIZE iEdg, All911Vertices &vertices);
96+
void advance911Edge(BGSIZE iEdg, All911Vertices &vertices);
9797

9898
/// unused virtual function placeholder
99-
virtual void advanceEdge(const BGSIZE iEdg, AllVertices &vertices) override {};
99+
virtual void advanceEdge(BGSIZE iEdg, AllVertices &vertices) override {};
100100

101101
#endif
102102

Simulator/Edges/Neuro/AllDSSynapses.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void AllDSSynapses::printParameters() const
5757
///
5858
/// @param input istream to read from.
5959
/// @param iEdg Index of the synapse to set.
60-
void AllDSSynapses::readEdge(istream &input, const BGSIZE iEdg)
60+
void AllDSSynapses::readEdge(istream &input, BGSIZE iEdg)
6161
{
6262
AllSpikingSynapses::readEdge(input, iEdg);
6363

@@ -80,7 +80,7 @@ void AllDSSynapses::readEdge(istream &input, const BGSIZE iEdg)
8080
///
8181
/// @param output stream to print out to.
8282
/// @param iEdg Index of the synapse to print out.
83-
void AllDSSynapses::writeEdge(ostream &output, const BGSIZE iEdg) const
83+
void AllDSSynapses::writeEdge(ostream &output, BGSIZE iEdg) const
8484
{
8585
AllSpikingSynapses::writeEdge(output, iEdg);
8686

@@ -96,7 +96,7 @@ void AllDSSynapses::writeEdge(ostream &output, const BGSIZE iEdg) const
9696
///
9797
/// @param iEdg Index of the synapse to set.
9898
/// @param deltaT Inner simulation step duration
99-
void AllDSSynapses::resetEdge(const BGSIZE iEdg, BGFLOAT deltaT)
99+
void AllDSSynapses::resetEdge(BGSIZE iEdg, BGFLOAT deltaT)
100100
{
101101
AllSpikingSynapses::resetEdge(iEdg, deltaT);
102102

@@ -112,7 +112,7 @@ void AllDSSynapses::resetEdge(const BGSIZE iEdg, BGFLOAT deltaT)
112112
/// @param destVertex Coordinates of the destination Neuron.
113113
/// @param deltaT Inner simulation step duration.
114114
/// @param type Type of the Synapse to create.
115-
void AllDSSynapses::createEdge(const BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
115+
void AllDSSynapses::createEdge(BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
116116
edgeType type)
117117
{
118118
AllSpikingSynapses::createEdge(iEdg, srcVertex, destVertex, deltaT, type);
@@ -159,7 +159,7 @@ void AllDSSynapses::createEdge(const BGSIZE iEdg, int srcVertex, int destVertex,
159159
///
160160
/// @param iEdg Index of the synapse to set.
161161
/// @param deltaT Inner simulation step duration.
162-
void AllDSSynapses::changePSR(const BGSIZE iEdg, BGFLOAT deltaT)
162+
void AllDSSynapses::changePSR(BGSIZE iEdg, BGFLOAT deltaT)
163163
{
164164
BGFLOAT &psr = psr_[iEdg];
165165
BGFLOAT &W = W_[iEdg];

Simulator/Edges/Neuro/AllDSSynapses.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class AllDSSynapses : public AllSpikingSynapses {
7171
///
7272
/// @param iEdg Index of the synapse to set.
7373
/// @param deltaT Inner simulation step duration
74-
virtual void resetEdge(const BGSIZE iEdg, BGFLOAT deltaT) override;
74+
virtual void resetEdge(BGSIZE iEdg, BGFLOAT deltaT) override;
7575

7676
/// Prints out all parameters to logging file.
7777
/// Registered to OperationManager as Operation::printParameters
@@ -84,7 +84,7 @@ class AllDSSynapses : public AllSpikingSynapses {
8484
/// @param destVertex Coordinates of the destination Neuron.
8585
/// @param deltaT Inner simulation step duration.
8686
/// @param type Type of the Synapse to create.
87-
virtual void createEdge(const BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
87+
virtual void createEdge(BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
8888
edgeType type) override;
8989

9090
/// Prints SynapsesProps data to console.
@@ -101,13 +101,13 @@ class AllDSSynapses : public AllSpikingSynapses {
101101
///
102102
/// @param input istream to read from.
103103
/// @param iEdg Index of the synapse to set.
104-
virtual void readEdge(istream &input, const BGSIZE iEdg) override;
104+
virtual void readEdge(istream &input, BGSIZE iEdg) override;
105105

106106
/// Write the synapse data to the stream.
107107
///
108108
/// @param output stream to print out to.
109109
/// @param iEdg Index of the synapse to print out.
110-
virtual void writeEdge(ostream &output, const BGSIZE iEdg) const override;
110+
virtual void writeEdge(ostream &output, BGSIZE iEdg) const override;
111111

112112
#if defined(USE_GPU)
113113
public:
@@ -202,7 +202,7 @@ class AllDSSynapses : public AllSpikingSynapses {
202202
///
203203
/// @param iEdg Index of the synapse to set.
204204
/// @param deltaT Inner simulation step duration.
205-
virtual void changePSR(const BGSIZE iEdg, BGFLOAT deltaT) override;
205+
virtual void changePSR(BGSIZE iEdg, BGFLOAT deltaT) override;
206206

207207
#endif // defined(USE_GPU)
208208
public:

Simulator/Edges/Neuro/AllDynamicSTDPSynapses.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void AllDynamicSTDPSynapses::printParameters() const
5757
///
5858
/// @param input istream to read from.
5959
/// @param iEdg Index of the synapse to set.
60-
void AllDynamicSTDPSynapses::readEdge(istream &input, const BGSIZE iEdg)
60+
void AllDynamicSTDPSynapses::readEdge(istream &input, BGSIZE iEdg)
6161
{
6262
AllSTDPSynapses::readEdge(input, iEdg);
6363

@@ -80,7 +80,7 @@ void AllDynamicSTDPSynapses::readEdge(istream &input, const BGSIZE iEdg)
8080
///
8181
/// @param output stream to print out to.
8282
/// @param iEdg Index of the synapse to print out.
83-
void AllDynamicSTDPSynapses::writeEdge(ostream &output, const BGSIZE iEdg) const
83+
void AllDynamicSTDPSynapses::writeEdge(ostream &output, BGSIZE iEdg) const
8484
{
8585
AllSTDPSynapses::writeEdge(output, iEdg);
8686

@@ -96,7 +96,7 @@ void AllDynamicSTDPSynapses::writeEdge(ostream &output, const BGSIZE iEdg) const
9696
///
9797
/// @param iEdg Index of the synapse to set.
9898
/// @param deltaT Inner simulation step duration
99-
void AllDynamicSTDPSynapses::resetEdge(const BGSIZE iEdg, BGFLOAT deltaT)
99+
void AllDynamicSTDPSynapses::resetEdge(BGSIZE iEdg, BGFLOAT deltaT)
100100
{
101101
AllSTDPSynapses::resetEdge(iEdg, deltaT);
102102

@@ -112,8 +112,8 @@ void AllDynamicSTDPSynapses::resetEdge(const BGSIZE iEdg, BGFLOAT deltaT)
112112
/// @param destVertex Index of the destination Neuron.
113113
/// @param deltaT Inner simulation step duration.
114114
/// @param type Type of the Synapse to create.
115-
void AllDynamicSTDPSynapses::createEdge(const BGSIZE iEdg, int srcVertex, int destVertex,
116-
BGFLOAT deltaT, edgeType type)
115+
void AllDynamicSTDPSynapses::createEdge(BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
116+
edgeType type)
117117
{
118118
AllSTDPSynapses::createEdge(iEdg, srcVertex, destVertex, deltaT, type);
119119

@@ -159,7 +159,7 @@ void AllDynamicSTDPSynapses::createEdge(const BGSIZE iEdg, int srcVertex, int de
159159
///
160160
/// @param iEdg Index of the synapse to set.
161161
/// @param deltaT Inner simulation step duration.
162-
void AllDynamicSTDPSynapses::changePSR(const BGSIZE iEdg, BGFLOAT deltaT)
162+
void AllDynamicSTDPSynapses::changePSR(BGSIZE iEdg, BGFLOAT deltaT)
163163
{
164164
BGFLOAT &psr = this->psr_[iEdg];
165165
BGFLOAT &W = this->W_[iEdg];

Simulator/Edges/Neuro/AllDynamicSTDPSynapses.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class AllDynamicSTDPSynapses : public AllSTDPSynapses {
7676
///
7777
/// @param iEdg Index of the synapse to set.
7878
/// @param deltaT Inner simulation step duration
79-
virtual void resetEdge(const BGSIZE iEdg, BGFLOAT deltaT) override;
79+
virtual void resetEdge(BGSIZE iEdg, BGFLOAT deltaT) override;
8080

8181
/// Prints out all parameters to logging file.
8282
/// Registered to OperationManager as Operation::printParameters
@@ -89,7 +89,7 @@ class AllDynamicSTDPSynapses : public AllSTDPSynapses {
8989
/// @param destVertex Index of the destination Neuron.
9090
/// @param deltaT Inner simulation step duration.
9191
/// @param type Type of the Synapse to create.
92-
virtual void createEdge(const BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
92+
virtual void createEdge(BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
9393
edgeType type) override;
9494

9595
/// Prints SynapsesProps data.
@@ -106,13 +106,13 @@ class AllDynamicSTDPSynapses : public AllSTDPSynapses {
106106
///
107107
/// @param input istream to read from.
108108
/// @param iEdg Index of the synapse to set.
109-
virtual void readEdge(istream &input, const BGSIZE iEdg) override;
109+
virtual void readEdge(istream &input, BGSIZE iEdg) override;
110110

111111
/// Write the synapse data to the stream.
112112
///
113113
/// @param output stream to print out to.
114114
/// @param iEdg Index of the synapse to print out.
115-
virtual void writeEdge(ostream &output, const BGSIZE iEdg) const override;
115+
virtual void writeEdge(ostream &output, BGSIZE iEdg) const override;
116116

117117
#if defined(USE_GPU)
118118
public:
@@ -209,7 +209,7 @@ class AllDynamicSTDPSynapses : public AllSTDPSynapses {
209209
///
210210
/// @param iEdg Index of the synapse to set.
211211
/// @param deltaT Inner simulation step duration.
212-
virtual void changePSR(const BGSIZE iEdg, BGFLOAT deltaT);
212+
virtual void changePSR(BGSIZE iEdg, BGFLOAT deltaT);
213213

214214
#endif // defined(USE_GPU)
215215
public:

Simulator/Edges/Neuro/AllNeuroEdges.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void AllNeuroEdges::setupEdges(int numVertices, int maxEdges)
3232
///
3333
/// @param iEdg Index of the edge to set.
3434
/// @param deltaT Inner simulation step duration
35-
void AllNeuroEdges::resetEdge(const BGSIZE iEdg, BGFLOAT deltaT)
35+
void AllNeuroEdges::resetEdge(BGSIZE iEdg, BGFLOAT deltaT)
3636
{
3737
psr_[iEdg] = 0.0;
3838
}
@@ -41,7 +41,7 @@ void AllNeuroEdges::resetEdge(const BGSIZE iEdg, BGFLOAT deltaT)
4141
///
4242
/// @param input istream to read from.
4343
/// @param iEdg Index of the edge to set.
44-
void AllNeuroEdges::readEdge(istream &input, const BGSIZE iEdg)
44+
void AllNeuroEdges::readEdge(istream &input, BGSIZE iEdg)
4545
{
4646
int synapse_type(0);
4747

@@ -66,7 +66,7 @@ void AllNeuroEdges::readEdge(istream &input, const BGSIZE iEdg)
6666
///
6767
/// @param output stream to print out to.
6868
/// @param iEdg Index of the edge to print out.
69-
void AllNeuroEdges::writeEdge(ostream &output, const BGSIZE iEdg) const
69+
void AllNeuroEdges::writeEdge(ostream &output, BGSIZE iEdg) const
7070
{
7171
output << sourceVertexIndex_[iEdg] << ends;
7272
output << destVertexIndex_[iEdg] << ends;

Simulator/Edges/Neuro/AllNeuroEdges.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class AllNeuroEdges : public AllEdges {
5757
///
5858
/// @param iEdg Index of the edge to set.
5959
/// @param deltaT Inner simulation step duration
60-
virtual void resetEdge(const BGSIZE iEdg, BGFLOAT deltaT);
60+
virtual void resetEdge(BGSIZE iEdg, BGFLOAT deltaT);
6161

6262
// /// Create a Synapse and connect it to the model.
6363
// ///
@@ -66,7 +66,7 @@ class AllNeuroEdges : public AllEdges {
6666
// /// @param dest Coordinates of the destination Neuron.
6767
// /// @param deltaT Inner simulation step duration.
6868
// /// @param type Type of the Synapse to create.
69-
// virtual void createEdge(const BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
69+
// virtual void createEdge(BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT,
7070
// edgeType type) override;
7171

7272
/// Get the sign of the edgeType.
@@ -89,13 +89,13 @@ class AllNeuroEdges : public AllEdges {
8989
///
9090
/// @param input istream to read from.
9191
/// @param iEdg Index of the edge to set.
92-
virtual void readEdge(istream &input, const BGSIZE iEdg) override;
92+
virtual void readEdge(istream &input, BGSIZE iEdg) override;
9393

9494
/// Write the edge data to the stream.
9595
///
9696
/// @param output stream to print out to.
9797
/// @param iEdg Index of the edge to print out.
98-
virtual void writeEdge(ostream &output, const BGSIZE iEdg) const override;
98+
virtual void writeEdge(ostream &output, BGSIZE iEdg) const override;
9999

100100
public:
101101
/// The factor to adjust overlapping area to edge weight.

0 commit comments

Comments
 (0)