nrn
nrn copied to clipboard
nrn_setup: use std::vector for cell_groups (dat_files)
Context
Coreneuron nrn_setup uses a plain malloc'd array for holding the input data cell groups (from files.dat).
These arrays, besides being plain old and not self managed, could not grow and had a static size of nfiles/nranks + 1.
However, in the view of the upcoming load balanced input data, each rank may hold a different count of cell groups. Those changes will come as a follow-up PR.
This PR
Refactors this part of the code to replace the data structure by an std::vector, which
- grows as required and auto deallocs
- avoids the book-keeping of the size as a separate variable