Bug fix: shared state time vector swap (#1253)
Fixes a bug caused by swapping the `time` and `time_to` vectors in the `shared_state` and not swapping the corresponding data pointers in the `threshold_watcher` and `mechanism`. - This fix keeps the swapping optimization, and instead, the `threshold_watcher` and `mechanism` hold pointers to the std::vectors (not the underlying arrays) which are dereferenced before use. - The mechanism API functions have been renamed. - A unit test is also added that checks the interpolation behavior of the `threshold_watcher`. Fixes #1251
Showing
- arbor/backends/gpu/fvm.hpp 2 additions, 2 deletionsarbor/backends/gpu/fvm.hpp
- arbor/backends/gpu/mechanism.cpp 5 additions, 3 deletionsarbor/backends/gpu/mechanism.cpp
- arbor/backends/gpu/mechanism.hpp 20 additions, 0 deletionsarbor/backends/gpu/mechanism.hpp
- arbor/backends/gpu/threshold_watcher.hpp 13 additions, 9 deletionsarbor/backends/gpu/threshold_watcher.hpp
- arbor/backends/multicore/fvm.hpp 2 additions, 2 deletionsarbor/backends/multicore/fvm.hpp
- arbor/backends/multicore/mechanism.cpp 3 additions, 2 deletionsarbor/backends/multicore/mechanism.cpp
- arbor/backends/multicore/mechanism.hpp 18 additions, 0 deletionsarbor/backends/multicore/mechanism.hpp
- arbor/backends/multicore/threshold_watcher.hpp 12 additions, 9 deletionsarbor/backends/multicore/threshold_watcher.hpp
- arbor/fvm_lowered_cell_impl.hpp 4 additions, 4 deletionsarbor/fvm_lowered_cell_impl.hpp
- arbor/include/arbor/mechanism.hpp 3 additions, 3 deletionsarbor/include/arbor/mechanism.hpp
- test/ubench/mech_vec.cpp 8 additions, 8 deletionstest/ubench/mech_vec.cpp
- test/unit/test_fvm_lowered.cpp 10 additions, 10 deletionstest/unit/test_fvm_lowered.cpp
- test/unit/test_kinetic_linear.cpp 1 addition, 1 deletiontest/unit/test_kinetic_linear.cpp
- test/unit/test_mech_temp_diam.cpp 2 additions, 2 deletionstest/unit/test_mech_temp_diam.cpp
- test/unit/test_mechanisms.cpp 2 additions, 2 deletionstest/unit/test_mechanisms.cpp
- test/unit/test_mechcat.cpp 3 additions, 3 deletionstest/unit/test_mechcat.cpp
- test/unit/test_spikes.cpp 51 additions, 1 deletiontest/unit/test_spikes.cpp
Please register or sign in to comment