Skip to content

Commit db99438

Browse files
authored
Merge branch 'development' into issue-515-remove-const-parameters-primitive
2 parents 996b830 + 3082b1b commit db99438

28 files changed

+131
-138
lines changed

Simulator/Core/EdgeIndexMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Edge indices are stored in the edge forward map (forwardIndex), and
1212
* the pointer and length of the vertex i's outgoing edge indices are specified
1313
* by outgoingSynapse_begin[i] and edgeCount[i] respectively.
14-
* The incoming edges list is used in calcSummationMapDevice() device function to
14+
* The incoming edges list is used in calcSummationPointDevice() device function to
1515
* calculate sum of PSRs for each vertex simultaneously.
1616
* The list also used in AllSpikingNeurons::advanceVertices() function to allow back propagation.
1717
*

Simulator/Core/GPUModel.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,22 +171,22 @@ void GPUModel::advance()
171171
#endif // PERFORMANCE_METRICS
172172

173173
// calculate summation point
174-
calcSummationMap();
174+
calcSummationPoint();
175175

176176
#ifdef PERFORMANCE_METRICS
177177
cudaLapTime(t_gpu_calcSummation);
178178
#endif // PERFORMANCE_METRICS
179179
}
180180

181181
/// Add psr of all incoming synapses to summation points.
182-
void GPUModel::calcSummationMap()
182+
void GPUModel::calcSummationPoint()
183183
{
184184
// CUDA parameters
185185
const int threadsPerBlock = 256;
186186
int blocksPerGrid
187187
= (Simulator::getInstance().getTotalVertices() + threadsPerBlock - 1) / threadsPerBlock;
188188

189-
calcSummationMapDevice<<<blocksPerGrid, threadsPerBlock>>>(
189+
calcSummationPointDevice<<<blocksPerGrid, threadsPerBlock>>>(
190190
Simulator::getInstance().getTotalVertices(), allVerticesDevice_, synapseIndexMapDevice_,
191191
allEdgesDevice_);
192192
}
@@ -324,10 +324,10 @@ void GPUModel::copySynapseIndexMapHostToDevice(EdgeIndexMap &synapseIndexMapHost
324324
/// @param[in] synapseIndexMapDevice_ Pointer to forward map structures in device memory.
325325
/// @param[in] allEdgesDevice Pointer to Synapse structures in device memory.
326326
__global__ void
327-
calcSummationMapDevice(int totalVertices,
328-
AllSpikingNeuronsDeviceProperties *__restrict__ allVerticesDevice,
329-
const EdgeIndexMapDevice *__restrict__ synapseIndexMapDevice_,
330-
const AllSpikingSynapsesDeviceProperties *__restrict__ allEdgesDevice)
327+
calcSummationPointDevice(int totalVertices,
328+
AllSpikingNeuronsDeviceProperties *__restrict__ allVerticesDevice,
329+
const EdgeIndexMapDevice *__restrict__ synapseIndexMapDevice_,
330+
const AllSpikingSynapsesDeviceProperties *__restrict__ allEdgesDevice)
331331
{
332332
// The usual thread ID calculation and guard against excess threads
333333
// (beyond the number of vertices, in this case).
@@ -355,7 +355,7 @@ __global__ void
355355
sum += allEdgesDevice->psr_[synIndex];
356356
}
357357
// Store summed PSR into this neuron's summation point
358-
allVerticesDevice->summationMap_[idx] = sum;
358+
allVerticesDevice->summationPoints_[idx] = sum;
359359
}
360360
}
361361

Simulator/Core/GPUModel.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class GPUModel : public Model {
113113
virtual void deleteDeviceStruct(void **allVerticesDevice, void **allEdgesDevice);
114114

115115
/// Add psr of all incoming synapses to summation points.
116-
virtual void calcSummationMap();
116+
virtual void calcSummationPoint();
117117

118118
/// Pointer to device random noise array.
119119
float *randNoise_d;
@@ -161,8 +161,8 @@ void initMTGPU(unsigned int seed, unsigned int blocks, unsigned int threads, uns
161161

162162
//! Calculate summation point.
163163
extern __global__ void
164-
calcSummationMapDevice(int totalVertices,
165-
AllSpikingNeuronsDeviceProperties *__restrict__ allNeurnsDevice,
166-
const EdgeIndexMapDevice *__restrict__ synapseIndexMapDevice_,
167-
const AllSpikingSynapsesDeviceProperties *__restrict__ allEdgesDevice);
164+
calcSummationPointDevice(int totalVertices,
165+
AllSpikingNeuronsDeviceProperties *__restrict__ allNeurnsDevice,
166+
const EdgeIndexMapDevice *__restrict__ synapseIndexMapDevice_,
167+
const AllSpikingSynapsesDeviceProperties *__restrict__ allEdgesDevice);
168168
#endif

Simulator/Edges/Neuro/AllSTDPSynapses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ void AllSTDPSynapses::advanceEdge(BGSIZE iEdg, AllVertices &neurons)
383383
#ifdef USE_OMP
384384
#pragma omp atomic
385385
#endif
386-
neurons.summationMap_[sumPointIndex] += psr;
386+
neurons.summationPoints_[sumPointIndex] += psr;
387387
#ifdef USE_OMP
388388
//PAB: atomic above has implied flush (following statement generates error -- can't be member variable)
389389
//#pragma omp flush (summationPoint)

Simulator/Edges/Neuro/AllSpikingSynapses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ void AllSpikingSynapses::advanceEdge(BGSIZE iEdg, AllVertices &neurons)
286286
#ifdef USE_OMP
287287
#pragma omp atomic #endif
288288
#endif
289-
neurons.summationMap_[sumPointIndex] += psr;
289+
neurons.summationPoints_[sumPointIndex] += psr;
290290
#ifdef USE_OMP
291291
//PAB: atomic above has implied flush (following statement generates error -- can't be member variable)
292292
//#pragma omp flush (summationPoint)

Simulator/Edges/Neuro/AllSynapsesDeviceFuncs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ extern __global__ void
4444
/// destination neurons.
4545
///
4646
/// @param allEdgesDevice Pointer to the Synapse structures in device memory.
47-
/// @param pSummationMap Pointer to the summation point.
47+
/// @param pSummationPoint Pointer to the summation point.
4848
/// @param deltaT The simulation time step size.
4949
/// @param weight Synapse weight.
5050
extern __global__ void initSynapsesDevice(int n, AllDSSynapsesDeviceProperties *allEdgesDevice,

Simulator/Edges/Neuro/AllSynapsesDeviceFuncs_d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ __global__ void updateSynapsesWeightsDevice(int numVertices, BGFLOAT deltaT, BGF
601601
/// destination neurons.
602602
///
603603
/// @param allEdgesDevice Pointer to the Synapse structures in device memory.
604-
/// @param pSummationMap Pointer to the summation point.
604+
/// @param pSummationPoint Pointer to the summation point.
605605
/// @param deltaT The simulation time step size.
606606
/// @param weight Synapse weight.
607607
__global__ void initSynapsesDevice(int n, AllDSSynapsesDeviceProperties *allEdgesDevice,

Simulator/Utils/Inputs/GpuSInputPoisson.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void GpuSInputPoisson::inputStimulus(SimulationInfo* psi)
8282
advanceSpikingSynapsesDevice <<< blocksPerGrid, threadsPerBlock >>> ( edge_count, edgeIndexMapDevice, g_simulationStep, psi->deltaT, (AllSpikingSynapsesDeviceProperties*)allEdgesDevice );
8383

8484
// update summation point
85-
applyI2SummationMap <<< blocksPerGrid, threadsPerBlock >>> ( vertex_count, psi->pSummationMap, allEdgesDevice );
85+
applyI2SummationMap <<< blocksPerGrid, threadsPerBlock >>> ( vertex_count, psi->pSummationPoint, allEdgesDevice );
8686
}
8787

8888
/// Allocate GPU device memory and copy values
@@ -108,7 +108,7 @@ void GpuSInputPoisson::allocDeviceValues(IModel* model, SimulationInfo* psi, int
108108
const int threadsPerBlock = 256;
109109
int blocksPerGrid = ( vertex_count + threadsPerBlock - 1 ) / threadsPerBlock;
110110

111-
initSynapsesDevice <<< blocksPerGrid, threadsPerBlock >>> ( vertex_count, allEdgesDevice, psi->pSummationMap, psi->width, psi->deltaT, weight );
111+
initSynapsesDevice <<< blocksPerGrid, threadsPerBlock >>> ( vertex_count, allEdgesDevice, psi->pSummationPoint, psi->width, psi->deltaT, weight );
112112

113113
// allocate memory for curand global state
114114
HANDLE_ERROR( cudaMalloc ( &devStates_d, vertex_count * sizeof( curandState ) ) );

Simulator/Utils/Inputs/GpuSInputRegular.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void GpuSInputRegular::inputStimulus(SimulationInfo* psi)
7171

7272
// add input to each summation point
7373
blocksPerGrid = ( vertex_count + threadsPerBlock - 1 ) / threadsPerBlock;
74-
inputStimulusDevice <<< blocksPerGrid, threadsPerBlock >>> ( vertex_count, psi->pSummationMap, initValues_d, nShiftValues_d, nStepsInCycle, nStepsCycle, nStepsDuration );
74+
inputStimulusDevice <<< blocksPerGrid, threadsPerBlock >>> ( vertex_count, psi->pSummationPoint, initValues_d, nShiftValues_d, nStepsInCycle, nStepsCycle, nStepsDuration );
7575
// update cycle count
7676
nStepsInCycle = (nStepsInCycle + 1) % nStepsCycle;
7777
}

Simulator/Utils/Inputs/HostSInputRegular.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void HostSInputRegular::inputStimulus()
5151
for (int i = Simulator::getInstance().getTotalVertices() - 1; i >= 0; --i) {
5252
if ((nStepsInCycle >= nShiftValues[i])
5353
&& (nStepsInCycle < (nShiftValues[i] + nStepsDuration) % nStepsCycle))
54-
Simulator::getInstance().getLayout().getVertices().summationMap_[i] += values[i];
54+
Simulator::getInstance().getLayout().getVertices().summationPoints_[i] += values[i];
5555
}
5656

5757
// update cycle count

0 commit comments

Comments
 (0)