Skip to content

Commit 7875dc9

Browse files
committed
retuning R1234
1 parent 4563cc0 commit 7875dc9

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

hydra/detail/external/hydra_R123/philox.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ _mulhilo_fail_tpl(64, uint64_t)
272272
#endif
273273

274274
#ifndef PHILOX4x64_DEFAULT_ROUNDS
275-
#define PHILOX4x64_DEFAULT_ROUNDS 9
275+
#define PHILOX4x64_DEFAULT_ROUNDS 7//10
276276
#endif
277277
/** \cond HIDDEN_FROM_DOXYGEN */
278278

hydra/detail/external/hydra_R123/threefry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ R123_CUDA_DEVICE R123_STATIC_INLINE uint32_t RotL_32(uint32_t x, unsigned int N)
189189
#endif
190190

191191
#ifndef THREEFRY4x64_DEFAULT_ROUNDS
192-
#define THREEFRY4x64_DEFAULT_ROUNDS 13
192+
#define THREEFRY4x64_DEFAULT_ROUNDS 12
193193
#endif
194194

195195
#define _threefry2x_tpl(W) \

testing/threefry_long_practrand.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#define TCLAP_SETBASE_ZERO 1
3737
#include <tclap/CmdLine.h>
3838

39+
3940
//set a global seed
4041
static const uint64_t default_seed= 0x548c9decbce65295 ;
4142

@@ -63,8 +64,14 @@ int main(int argv, char** argc)
6364

6465
hydra::threefry_long RNG(seed);
6566

67+
constexpr size_t BUFFER_SIZE = 1024 * 1024 / sizeof(uint64_t);
68+
static uint64_t buffer[BUFFER_SIZE];
69+
6670
while (1) {
67-
uint64_t value = RNG();
68-
fwrite((void*) &value, sizeof(value), 1, stdout);
71+
//uint64_t value = RNG();
72+
for (size_t i = 0; i < BUFFER_SIZE; ++i)
73+
buffer[i] = RNG();
74+
//fwrite((void*) &value, sizeof(value), 1, stdout);
75+
fwrite((void*) buffer, sizeof(buffer[0]), BUFFER_SIZE, stdout);
6976
}
7077
}

0 commit comments

Comments
 (0)