nrn
nrn copied to clipboard
Refactor `src/gnu`
Not familiar with all the code in gnu
(except for the d_avec
refactoring to std::vector
)
A couple of ideas to brainstorm:
- random generators + distribution -> use std library ? Can all be replaced? Do we have a 1to1 replacement in the std library? Do we need to maintain all of them? Binary differences to be expected
- [x] complex -> move to std::complex ?
- [ ] ACG : can be replaced by Random123 generator
- [ ] Binomial : https://en.cppreference.com/w/cpp/numeric/random/binomial_distribution
- [ ] DiscUnif : https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution
- [ ] Erlang :
- [ ] Geom : https://en.cppreference.com/w/cpp/numeric/random/geometric_distribution
- [ ] HypGeom :
- [ ] LogNorm : https://en.cppreference.com/w/cpp/numeric/random/lognormal_distribution
- [ ] MLCG : can be replaced by Random123 generator
- [ ] NegExp :
- [ ] Normal : https://en.cppreference.com/w/cpp/numeric/random/normal_distribution
- [ ] Poisson : https://en.cppreference.com/w/cpp/numeric/random/poisson_distribution
- [ ] RndInt :
- [ ] Uniform : https://en.cppreference.com/w/cpp/numeric/random/uniform_real_distribution
- [ ] Weibull : https://en.cppreference.com/w/cpp/numeric/random/weibull_distribution
I'd be delighted to see the gnu subdirectory disappear.
Was discussing today about PRNGs, we were wondering if we shouldn't drop some unused number generators?
https://nrn.readthedocs.io/en/latest/python/programming/math/random.html?highlight=random#Random.ACG
As far as I understand , only Random123
and MCellRan4
are of interest wrt support for parallel simulations. Do we have any usecase for the rest? If so, I imagine we can use std
implementations for most of them (readily available)
cc: @jamesgking
For what it's worth, MLCG and ACG do not appear to be used in any ModelDB entries.