Virtualize cell_group (#236)
Virtualization of the `cell_group` interface is necessary for support of other (i.e. non-multicompartment) cell models, including e.g. Poisson spike generators. * Make `cell_group` an abstract base class; the previous `cell_group` class that is parameterized by the back-end FVM implementation is renamed `mc_cell_group` ('mc' stands for 'multi-compartment') and derives from the abstract `cell_group`. * Remove template parameter `Cell` from `model` type: a `model` can in principle now manage multiple types of concrete objects derived from `cell_group`. * Extend `model` constructor to take a hint about which back-end to use when constructing cell groups: `use_multicore` or `prefer_gpu`. This is a placeholder for a more sophisticated implementation once we have the requirements for a richer "ecosystem" of cell types. * Simplified some generic types to remove template dependencies between front and back ends: * Define a global `using time_type=float` in `common_types.hpp`. * Define a concrete `sampler_function` type alias for the `std::function<...>` type used for samplers. * Use a `null` back-end fallback for GPU if support is not there at compile time.
Showing
- .ycm_extra_conf.py 2 additions, 2 deletions.ycm_extra_conf.py
- miniapp/miniapp.cpp 5 additions, 13 deletionsminiapp/miniapp.cpp
- src/backends.hpp 22 additions, 0 deletionssrc/backends.hpp
- src/backends/fvm.hpp 37 additions, 0 deletionssrc/backends/fvm.hpp
- src/backends/gpu/fvm.hpp 4 additions, 0 deletionssrc/backends/gpu/fvm.hpp
- src/backends/multicore/fvm.hpp 4 additions, 0 deletionssrc/backends/multicore/fvm.hpp
- src/cell_group.hpp 19 additions, 253 deletionssrc/cell_group.hpp
- src/fvm_multicell.hpp 0 additions, 1 deletionsrc/fvm_multicell.hpp
- src/mc_cell_group.hpp 272 additions, 0 deletionssrc/mc_cell_group.hpp
- src/memory/allocator.hpp 5 additions, 5 deletionssrc/memory/allocator.hpp
- src/memory/gpu.hpp 1 addition, 1 deletionsrc/memory/gpu.hpp
- src/memory/host_coordinator.hpp 3 additions, 3 deletionssrc/memory/host_coordinator.hpp
- src/memory/memory.hpp 2 additions, 2 deletionssrc/memory/memory.hpp
- src/memory/wrappers.hpp 3 additions, 3 deletionssrc/memory/wrappers.hpp
- src/model.hpp 45 additions, 29 deletionssrc/model.hpp
- src/sampler_function.hpp 14 additions, 0 deletionssrc/sampler_function.hpp
- src/simple_sampler.hpp 10 additions, 10 deletionssrc/simple_sampler.hpp
- src/util/config.hpp 1 addition, 1 deletionsrc/util/config.hpp
- tests/performance/io/disk_io.cpp 0 additions, 2 deletionstests/performance/io/disk_io.cpp
- tests/unit/CMakeLists.txt 3 additions, 2 deletionstests/unit/CMakeLists.txt
Please register or sign in to comment