Skip to content
Snippets Groups Projects
Commit 6beb1ce0 authored by Ben Cumming's avatar Ben Cumming Committed by Sam Yates
Browse files

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.
parent 5f85bd7d
No related branches found
No related tags found
Showing
with 452 additions and 327 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment