Skip to content

Commit 4e069df

Browse files
committed
Update rprand.h
1 parent c40240c commit 4e069df

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

benchmark/external/rprand.h

+8-3
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,13 @@ RPRANDAPI void rprand_unload_sequence(int *sequence); // Unload pseudo
147147
//----------------------------------------------------------------------------------
148148
// Global Variables Definition
149149
//----------------------------------------------------------------------------------
150-
static uint64_t rprand_seed = 0; // SplitMix64 actual seed
151-
static uint32_t rprand_state[4] = { 0 }; // Xoshiro128** state, nitialized by SplitMix64
150+
static uint64_t rprand_seed = 0xAABBCCDD; // SplitMix64 default seed (aligned to rprand_state)
151+
static uint32_t rprand_state[4] = { // Xoshiro128** state, initialized by SplitMix64
152+
0x96ea83c1,
153+
0x218b21e5,
154+
0xaa91febd,
155+
0x976414d4
156+
};
152157

153158
//----------------------------------------------------------------------------------
154159
// Module internal functions declaration
@@ -202,7 +207,7 @@ int *rprand_load_sequence(unsigned int count, int min, int max)
202207
{
203208
value = ((unsigned int)rprand_xoshiro()%(abs(max - min) + 1)) + min;
204209

205-
for (int j = 0; j < i; j++)
210+
for (unsigned int j = 0; j < i; j++)
206211
{
207212
if (sequence[j] == value)
208213
{

0 commit comments

Comments
 (0)