Appear 4 times in AllSTDPSynapses::advanceSynapse() and in advanceSTDPSynapsesDevice() in the file AllSynapsesDeviceFuncs_d.cu. This is incorrect, because the subtraction will convert an int to a uint if one of the operands is a uint. Since we know that the current simulation time step will always be greater than the time step when a spike in the history occurred (since that spike happened in the past), it is better to perform an unsigned subtraction, multiply by deltaT, then negate if necessary. So, the above two lines would be:
Lines of code like the following:
Appear 4 times in AllSTDPSynapses::advanceSynapse() and in advanceSTDPSynapsesDevice() in the file AllSynapsesDeviceFuncs_d.cu. This is incorrect, because the subtraction will convert an int to a uint if one of the operands is a uint. Since we know that the current simulation time step will always be greater than the time step when a spike in the history occurred (since that spike happened in the past), it is better to perform an unsigned subtraction, multiply by deltaT, then negate if necessary. So, the above two lines would be:
Note that this change needs to be captured for the multi-cluster simulation, too.
https://github.com/UWB-Biocomputing/BrainGrid/blob/4f4e674e3a673fcc52eeaaabc92e8f5d5b9bc890/Synapses/AllSTDPSynapses.cpp#L326