-
Notifications
You must be signed in to change notification settings - Fork 297
Implement std::normal_distribution #6585
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
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Side note: We also have some implementations of |
|
#6595 is preventing us from making this constexpr. We can defer implementing constexpr or I will use another algorithm to generate the normal distribution. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fbusato
left a comment
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. Just a couple of nits
libcudacxx/test/libcudacxx/std/random/distribution/normal.pass.cpp
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/ok to test 7c3c7bb |
|
|
||
| // <random> | ||
|
|
||
| // class bernoulli_distribution |
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.
Why are those tests deleted?
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.
I've put all tests in test_distribution.h. I can now just specify a CDF and test param sets and it will test everything. This speeds up the 15 or so distributions still to implement, improves consistency and means over 100 source files less.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Not sure what is up with CI. Question for my reviewers: I've been adding std::iostream operators so far. Does this make sense? I am not so sure any more, it might be better to just remove them all. |
This comment has been minimized.
This comment has been minimized.
|
CI had troubles. I reran it.
I would really want to remove them, but they are part of the standard. @davebayer @miscco any thought? |
This comment has been minimized.
This comment has been minimized.
We implement them for all other |
🥳 CI Workflow Results🟩 Finished in 1h 50m: Pass: 100%/90 | Total: 2d 04h | Max: 1h 49m | Hits: 84%/204441See results here. |
I will continue implementing them then. @miscco @fbusato any further changes? This PR is a template for how I intend to do the remaining distributions, in particular with regards to testing. Once this is merged I will open several concurrent PRs for other distributions, which can be reviewed in parallel. |
No description provided.