Skip to content

Commit 8fe3a18

Browse files
committed
Fix bug when OpenMP is used without PCG-C
1 parent 11ca680 commit 8fe3a18

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cpfloat_binary64.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,12 @@ static inline int cpf_fma(double *X, const double *A, const double *B,
312312
#ifdef _OPENMP
313313
#define INITRAND(seed) *seed = time(NULL);
314314
#define GEN_SINGLE_RAND(seed) \
315-
((INTTYPE)thread_safe_rand((unsigned int *)seed) + \
315+
((INTTYPE)thread_safe_rand((unsigned int *)seed) + \
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)thread_safe_rand((unsigned int *)seed) + \
320-
((INTTYPE)thread_safe_rand((unsigned int *)seed ) << 31))
319+
#define GEN_SINGLE_RAND(seed) ((INTTYPE)rand((unsigned int *)seed) + \
320+
((INTTYPE)rand((unsigned int *)seed ) << 31))
321321
#endif /*# ifdef _OPENMP */
322322
#endif /* #ifdef PCG_VARIANTS_H_INCLUDED */
323323

0 commit comments

Comments
 (0)