Skip to content
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

Add interface for common RNGs #19

Closed
2 of 3 tasks
sethrj opened this issue Jul 23, 2020 · 2 comments · Fixed by #41
Closed
2 of 3 tasks

Add interface for common RNGs #19

sethrj opened this issue Jul 23, 2020 · 2 comments · Fixed by #41
Assignees
Labels
core Software engineering infrastructure enhancement New feature or request

Comments

@sethrj
Copy link
Member

sethrj commented Jul 23, 2020

The RNG in random/ was based (on my suggestion) on what Shift does, using Nvidia-provided GPUs. To test RNG-based code on CPU as well, and if we want to build on HIP or another platform that doesn't provide curng adapters, we'll need something more portable. @whokion

  • Move RNG classes in random/ into random/cuda (see Add CUDA random number generator #2)
  • Add similar interfaces to one or more appropriate vecmath RNGs -- either porting vecmath code, or (probably better as a first step) just providing an interface to the vecmath

As the physics develops we'll want to add additional distributions (besides "uniform"). @amandalund you might be the best person to add a random/distributions/IsotropicDistribution class ported from the Nemesis/numerics/Uniform_Unit_Vector_Distribution class. Would you be up for that or shall I?

  • Sample isotropic direction on device
@amandalund
Copy link
Contributor

Sure, I'm on it.

@sethrj sethrj added the core Software engineering infrastructure label Aug 14, 2020
@whokion whokion changed the title Add interface for VecMath RNGs Add interface for common RNGs Sep 29, 2020
@sethrj sethrj linked a pull request Oct 24, 2020 that will close this issue
@sethrj
Copy link
Member Author

sethrj commented Oct 24, 2020

The decision was made to tweak the CUDA XORWOW RNG to be host-compatible rather than reimplement VecMath RNGs in Celeritas, since they were optimized for SIMD vector units.

@sethrj sethrj closed this as completed Oct 25, 2020
@sethrj sethrj added the enhancement New feature or request label Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Software engineering infrastructure enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants