Skip to content

Commit d370138

Browse files
committed
Fix generation of random numbers with OpenMP
1 parent 8fe3a18 commit d370138

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/cpfloat_binary64.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,7 @@ static inline int cpf_fma(double *X, const double *A, const double *B,
316316
((INTTYPE)thread_safe_rand((unsigned int *)seed) << 31))
317317
#else /*# ifdef _OPENMP */
318318
#define INITRAND(seed) srand(time(NULL));
319-
#define GEN_SINGLE_RAND(seed) ((INTTYPE)rand((unsigned int *)seed) + \
320-
((INTTYPE)rand((unsigned int *)seed ) << 31))
319+
#define GEN_SINGLE_RAND(seed) ((INTTYPE)rand() + ((INTTYPE)rand() << 31))
321320
#endif /*# ifdef _OPENMP */
322321
#endif /* #ifdef PCG_VARIANTS_H_INCLUDED */
323322

0 commit comments

Comments
 (0)