BlueBrain / nmodl

Code Generation Framework For NEURON MODeling Language
https://bluebrain.github.io/nmodl/
Apache License 2.0
57 stars 15 forks source link

Handle voltage via instance specific copy. #1532

Closed 1uc closed 4 weeks ago

1uc commented 1 month ago

In NOCMODL, the voltage is (when vectorized) handled via an instance specific copy. While in CoreNEURON, this is never done, which why the field is named v_unused.

This PR always uses v_unused. The reason we can't (easily) use the CoreNEURON variation is because sometimes, e.g. CVODE we need to register callbacks, those callbacks have a fixed signature, we can't simply pass through the voltage as an argument, instead we need to retrieve it, e.g. from the instance data.