-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
31 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Literature | ||
|
||
|
||
## Bachelor's Thesis | ||
## Bachelor's Thesis' | ||
[Extending_and_Accelerating_a_GPU_Ray_Tracing_Algorithm_for_Photon_Simulation_in_Beamlines_ohne.pdf](/docs/src/res/Extending_and_Accelerating_a_GPU_Ray_Tracing_Algorithm_for_Photon_Simulation_in_Beamlines_ohne.pdf) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# Pseudo Random Number Generators (PRNGs) on the GPU | ||
|
||
For RAYX we looked a little to to find a good and performant pseudo random number generator. We decided to use Squares RNG, which is counter based and utilizes a version of the Middle Square Weyl Sequence. We tested the method with the TestU01 bigcrush test with different seeds and it passed all of them. | ||
For RAYX we found a good and performant pseudo random number generator after some research. We cannot use default C++ options as they are not supported by our Shader code. We decided to use Squares RNG, which is counter based and utilizes a version of the Middle Square Weyl Sequence. We tested the method with the TestU01 bigcrush test with different seeds and it passed all of them. | ||
|
||
[Squares: A Fast Counter-Based RNG](https://arxiv.org/pdf/2004.06278.pdf) | ||
|
||
[TestU01: A C Library for Empirical Testing of | ||
Random Number Generators](https://www.iro.umontreal.ca/~lecuyer/myftp/papers/testu01.pdf) | ||
|
||
We added a few more methods for creating random numbers with more variety. These methods are: | ||
- `uint64_t squares64RNG(inout uint64_t ctr)`, which generates 64-Bit random integers from two 32-Bit random integers | ||
- `double squaresDoubleRNG(inout uint64_t ctr)`, which generates uniformly distributed doubles between 0 and 1 from one 64-Bit random integer | ||
- `double squaresNormalRNG(inout uint64_t ctr, double mu, double sigma)`, which creates (via the Box-Muller transform) a normal distributed double with mean `mu` and standard deviation `sigma`. This takes three random doulbes, which takes six 32-Bit integers. | ||
|
||
[Box–Muller transform](https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform?oldformat=true) | ||
## Links | ||
- [Squares: A Fast Counter-Based RNG](https://arxiv.org/pdf/2004.06278.pdf) | ||
- [TestU01: A C Library for Empirical Testing of | ||
Random Number Generators](https://www.iro.umontreal.ca/~lecuyer/myftp/papers/testu01.pdf) | ||
- [Box–Muller transform](https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform?oldformat=true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.