move spiked detection to back end (#167)
Moves spike detection to the back end, which is required to have fast spike detection on the gpu. Fixes #106. Backend: * Move spike detection into the backend. * Add a `threshold_watcher` type to each backend that is initialized with a reference to the field that it is to watch, along with indexes and thresholds for each variable in the field that is being watched. This class presents a simple host-side interface: * `test(t)` tests for crossings at time `t`. * `crossings()` returns all threshold crossings. * `clear_crossings()` resets (clears) the collected crossing events. * Implement the multicore back end detector directly from the original code. * Implement a `gpu_stack` for use with the gpu back end, that lets threads in a kernel conditionally push back into a flat array. Miniapp: * Run a single-step dummy run of model before starting the profiler, when profiling is enabled. * Initialize the spike output callback functions _after_ t...
Showing
- CMakeLists.txt 26 additions, 20 deletionsCMakeLists.txt
- miniapp/miniapp.cpp 25 additions, 23 deletionsminiapp/miniapp.cpp
- src/backends/fvm_gpu.hpp 187 additions, 1 deletionsrc/backends/fvm_gpu.hpp
- src/backends/fvm_multicore.hpp 114 additions, 0 deletionssrc/backends/fvm_multicore.hpp
- src/backends/gpu_stack.hpp 115 additions, 0 deletionssrc/backends/gpu_stack.hpp
- src/cell_group.hpp 30 additions, 42 deletionssrc/cell_group.hpp
- src/fvm_multicell.hpp 48 additions, 21 deletionssrc/fvm_multicell.hpp
- src/memory/allocator.hpp 43 additions, 6 deletionssrc/memory/allocator.hpp
- src/memory/gpu.hpp 1 addition, 1 deletionsrc/memory/gpu.hpp
- src/memory/managed_ptr.hpp 118 additions, 0 deletionssrc/memory/managed_ptr.hpp
- src/spike_source.hpp 0 additions, 81 deletionssrc/spike_source.hpp
- tests/unit/CMakeLists.txt 2 additions, 0 deletionstests/unit/CMakeLists.txt
- tests/unit/test_cell_group.cpp 2 additions, 2 deletionstests/unit/test_cell_group.cpp
- tests/unit/test_fvm_multi.cpp 5 additions, 10 deletionstests/unit/test_fvm_multi.cpp
- tests/unit/test_gpu_stack.cu 79 additions, 0 deletionstests/unit/test_gpu_stack.cu
- tests/unit/test_probe.cpp 1 addition, 2 deletionstests/unit/test_probe.cpp
- tests/unit/test_spikes.cpp 114 additions, 61 deletionstests/unit/test_spikes.cpp
- tests/unit/test_spikes.cu 122 additions, 0 deletionstests/unit/test_spikes.cu
Please register or sign in to comment