Skip to content

Commit 15b1aa2

Browse files
committed
detail/random , threefry engine added
1 parent 6104a57 commit 15b1aa2

File tree

4 files changed

+1042
-3
lines changed

4 files changed

+1042
-3
lines changed

hydra/Random.h

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
#include <hydra/detail/FunctorTraits.h>
4141
#include <hydra/detail/CompositeTraits.h>
4242
#include <hydra/detail/utility/Utility_Tuple.h>
43-
#include <hydra/detail/philox.h>
43+
#include <hydra/detail/random/philox.h>
44+
#include <hydra/detail/random/threefry.h>
4445

4546
#include <hydra/Range.h>
4647

@@ -66,8 +67,8 @@ namespace hydra{
6667
* in a future version.
6768
*/
6869
//typedef hydra_thrust::random::default_random_engine default_random_engine;
69-
typedef hydra::random::philox default_random_engine;
70-
70+
//typedef hydra::random::philox default_random_engine;
71+
typedef hydra::random::threefry default_random_engine;
7172

7273
/*! \typedef minstd_rand0
7374
* \brief A random number engine with predefined parameters which implements a version of
@@ -112,6 +113,19 @@ typedef hydra_thrust::random::ranlux48 ranlux48;
112113
typedef hydra_thrust::random::taus88 taus88;
113114

114115

116+
/*! \typedef philox
117+
* \brief The Philox family of counter-based RNGs use integer multiplication, xor and permutation of W-bit words
118+
* to scramble its N-word input key. Philox is a mnemonic for Product HI LO Xor).
119+
*
120+
*/
121+
typedef hydra::random::philox philox;
122+
123+
/*! \typedef philox
124+
* \brief Threefry uses integer addition, bitwise rotation, xor and permutation of words to randomize its output.
125+
*
126+
*/
127+
typedef hydra::random::threefry threefry;
128+
115129
namespace detail {
116130

117131
namespace random {

0 commit comments

Comments
 (0)