Revise sp_manager::global_shuffle #1933
Labels
good first issue
Good for newcomers
I: No breaking change
Previously written code will work as before, no one should note anything changing (aside the fix)
S: Normal
Handle this with default priority
stale
Automatic marker for inactivity, please have another look here
T: Maintenance
Work to keep up the quality of the code and documentation.
Currently, the behavior of
sp_manager::global_shuffle()
does not agree with the comment describing the method:The way the method is used (eg here
nest-simulator/nestkernel/sp_manager.cpp
Lines 439 to 440 in 5af6664
resize()
after calling the method is then not necessary).Comment and code need to be brought into agreement. One might also consider a more informative method name, including the "chopping" part. The implementation should be reviewed as well. It should be able to work in-place without need of the "erase" function (costly). It might make sense to use suitable C++11 functions, e.g. https://www.cplusplus.com/reference/algorithm/random_shuffle/. Finally, variable names in the method are very uninformative and should be revised.
The text was updated successfully, but these errors were encountered: