-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closes #3008: Add generator sym entry and stateful uniform distribution #3016
Closes #3008: Add generator sym entry and stateful uniform distribution #3016
Conversation
49582fb
to
71441cd
Compare
I forgot there's been changes to the chpl random module in recent versions, I'll need to make this compatible with chpl 1.31 and 1.32 |
dc50f92
to
e19c7f9
Compare
80672ab
to
e19c7f9
Compare
I did my best updating the random compat modules, but that was mostly just me loosening the memory management requirements to make the errors go away lol. @jeremiah-corrado seems to have touched those wouldn't mind double checking my work I'd appreciate it |
b70842a
to
b0bc5c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Just the one question about an extra array copy in the compat modules:
c945056
to
48ac878
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions, as marked, but otherwise looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
…distribution This PR (closes Bears-R-Us#3008) adds a generator sym entry to the symbol table. It also add a stateful uniform distribution i.e. repeated method calls won't return the same array with a set seed, but a new generator with the same seed will produce the same sequence of random arrays updated compat modules for backwards compatibility with chpl 1.32/1.31
06359a9
to
46bbec1
Compare
This PR (closes #3008) adds a generator sym entry to the symbol table. It also add a stateful uniform distribution. So repeated method calls won't return the same array with a set seed, but a new generator with the same seed will produce the same sequence of random arrays. It updates the methods which draw a from a uniform distribution to use the stateful variant
Example:
Its adds tests for this functionality. Note the tests for the legacy functions are copied over from the existing ones in
pdarraycreation