nest-simulator
nest-simulator copied to clipboard
Support different implementations of `Node` in the nestkernel
EDIT: Please refer to New-Node-Strcuture
Project: Vectorization:Infrastructure
With the current implementation of the Node
class in the nestkernel, adding any new class that should behave like the Node
class but with different internal logic won't be a very smooth transition, as the new class must be used everywhere and replace all occurrences of the Node
class with the new implementation.
As a requirement, we don't want to simply delete the Node
class or replace its internal logic with a new one. We want both Classes to be part of the kernel and to freely choose which implementation is the most suitable for the underlying model.
The main idea is to have a pure C++
interface that only exposes functions without any member fields. All derived Classes should then override those functions and implement their own internal logic. In such scenario, as a pure interface, we would have the NodeInterface
, and as derived classes we have Node
class and NodeVector
class that represents the vectorized implementation of the node.
All functions that should return an Object or data to the python interface should have a variable number of arguments. As an example, we have the get_status
that returns information about the node. In the single Node
class, the get_status
function will receive zero arguments, however for the Vectorized
case, we would get a set of IDs that represent the nodes that we are interested in. Each implementation of the get_status
should know how to handle its arguments and return the sorted data for the model instances.
Part of the DeviceNG
Pull request automatically marked stale!
@jougs Are there any future plans for this PR?
Discussed together with #2372.
Pull request automatically marked stale!