Branch: refs/heads/main
Revision: f5a0d97
Author: mppf
Link: Add support for fillRandom with bounds by mppf · Pull Request #19540 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #19540 from mppf/pcg-fillrandom-min-max
Add support for fillRandom with bounds
- adds PCGRandomStream.fillRandom with min, max arguments for the bounds
- adds PCGRandomStream.iterate with min, max arguments for the bounds
- changes
proc shuffle
to usegetNext_noLock
rather than
randlc_bounded
becauserandlc_bounded
has more complex calling
requirements (namely the position must be passed). There isn't a good
reason for it to track the position at all in this code so this is a
simplification and one that it is easier to write correctly.
Reviewed by @lydia-duncan - thanks!
-
[x] full local testing
Modified Files:
A test/library/standard/Random/ferguson/fillrandom-bounded.chpl
A test/library/standard/Random/ferguson/fillrandom-bounded.good
M modules/standard/Random.chplCompare: Comparing ef4e4e4c679d...f5a0d97ca834 · chapel-lang/chapel · GitHub