Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #286
This implementation is a quick solution that does the following when recording with
SpikeMonitor
from aSubgroup
.NeuronGroup
has its own spikespace, which is filled with the neuron IDs of spiking neurons. Incpp_standalone
, this spiekspace is sorted by neuron IDs. In Brian2CUDA, it is not, which is why we can't just read a consecutive subsection of the spikespace, where all neuron IDs belong to oneSubgroup
.thruds::count_if
to get the number of spiking neurons in theSubgroup
and then callsthrust::copy_if
to copy those IDs into another array (spikespace for subgroup).NeuronGroup
andSubgroup
recordings, but passing a different spikepace pointer.This implementation is surely not the most performant, but was instead easy to implement. I added #293 with suggestions for a better implementation.