Skip to content

Commit 0c2164f

Browse files
matched log information in cgraphitti validation mode with ggraphitti validation mode to allow for easier comparison
1 parent 7fe76a7 commit 0c2164f

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

Simulator/Core/GPUModel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ void GPUModel::advance()
189189
cudaMemcpyDeviceToHost));
190190

191191
for (int i = verts - 1; i >= 0; i--) {
192-
LOG4CPLUS_DEBUG(vertexLogger_, "CUDA advance Index[ "
193-
<< i << "] :: Noise = " << randNoise_h[i]
194-
<< "\tVm: " << vm_h[i] << endl
192+
LOG4CPLUS_DEBUG(vertexLogger_, endl
193+
<< "Advance Index[" << i << "] :: Noise = "
194+
<< randNoise_h[i] << "\tVm: " << vm_h[i] << endl
195195
<< "\tsp = " << sp_h[i] << endl
196196
<< "\tInoise = " << Inoise_h[i] << endl);
197197
}

Simulator/Vertices/Neuro/AllLIFNeurons.cpp

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,43 +32,49 @@ void AllLIFNeurons::advanceNeuron(int index)
3232
BGFLOAT &C2 = this->C2_[index];
3333
int &nStepsInRefr = this->numStepsInRefractoryPeriod_[index];
3434

35+
BGFLOAT noise;
3536
if (nStepsInRefr > 0) {
3637
// is neuron refractory?
3738
#ifdef VALIDATION_MODE
38-
BGFLOAT noise = (*noiseRNG)();
39-
LOG4CPLUS_DEBUG(vertexLogger_, "neuron refractory LIF[" << index << "] :: Noise = " << noise);
39+
noise = (*noiseRNG)();
40+
//LOG4CPLUS_DEBUG(vertexLogger_, "neuron refractory LIF[" << index << "] :: Noise = " << noise);
4041
#endif
4142
--nStepsInRefr;
4243
} else if (Vm >= Vthresh) {
4344
// should it fire?
4445
#ifdef VALIDATION_MODE
45-
BGFLOAT noise = (*noiseRNG)();
46-
LOG4CPLUS_DEBUG(vertexLogger_, "FIRE NEURON LIF[" << index << "] :: Noise = " << noise);
46+
noise = (*noiseRNG)();
47+
//LOG4CPLUS_DEBUG(vertexLogger_, "FIRE NEURON LIF[" << index << "] :: Noise = " << noise);
4748
#endif
4849
fire(index);
4950
} else {
5051
summationPoint += I0; // add IO
5152
// add noise
52-
BGFLOAT noise = (*noiseRNG)();
53+
noise = (*noiseRNG)();
5354
#ifdef VALIDATION_MODE
54-
LOG4CPLUS_DEBUG(vertexLogger_, "ADVANCE NEURON LIF[" << index << "] :: Noise = " << noise);
55+
//LOG4CPLUS_DEBUG(vertexLogger_, "ADVANCE NEURON LIF[" << index << "] :: Noise = " << noise);
5556
#endif
5657
summationPoint += noise * Inoise; // add noise
5758
Vm = C1 * Vm + C2 * summationPoint; // decay Vm and add inputs
5859
}
5960

6061
// Causes a huge slowdown since it's printed so frequently
6162
#ifdef VALIDATION_MODE
62-
LOG4CPLUS_DEBUG(vertexLogger_, "Index: " << index << " Vm: " << Vm);
63-
LOG4CPLUS_DEBUG(vertexLogger_, "NEURON[" << index << "] {" << endl
64-
<< "\tVm = " << Vm << endl
65-
<< "\tVthresh = " << Vthresh << endl
66-
<< "\tsummationPoint = " << summationPoint << endl
67-
<< "\tI0 = " << I0 << endl
68-
<< "\tInoise = " << Inoise << endl
69-
<< "\tC1 = " << C1 << endl
70-
<< "\tC2 = " << C2 << endl
71-
<< "}" << endl);
63+
LOG4CPLUS_DEBUG(vertexLogger_, endl
64+
<< "Advance Index[" << index << "] :: Noise = " << noise
65+
<< "\tVm: " << Vm << endl
66+
<< "\tsp = " << summationPoint << endl
67+
<< "\tInoise = " << Inoise << endl);
68+
// LOG4CPLUS_DEBUG(vertexLogger_, "Index: " << index << " Vm: " << Vm);
69+
// LOG4CPLUS_DEBUG(vertexLogger_, "NEURON[" << index << "] {" << endl
70+
// << "\tVm = " << Vm << endl
71+
// << "\tVthresh = " << Vthresh << endl
72+
// << "\tsummationPoint = " << summationPoint << endl
73+
// << "\tI0 = " << I0 << endl
74+
// << "\tInoise = " << Inoise << endl
75+
// << "\tC1 = " << C1 << endl
76+
// << "\tC2 = " << C2 << endl
77+
// << "}" << endl);
7278
#endif
7379

7480
// clear synaptic input for next time step

0 commit comments

Comments
 (0)