From 7abc9fdbd32b9bfddabaa5b98f24209e79fdba09 Mon Sep 17 00:00:00 2001 From: Uldis Locans Date: Wed, 23 Nov 2016 21:15:20 +0100 Subject: [PATCH] cuda random number initialization - same seed different sequence for each state --- src/CUDA/CudaBase.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CUDA/CudaBase.cu b/src/CUDA/CudaBase.cu index f352cf2..03fa327 100644 --- a/src/CUDA/CudaBase.cu +++ b/src/CUDA/CudaBase.cu @@ -8,7 +8,7 @@ __global__ void initcuRandState(curandState *state, int size, int seed = 0) { int idx = blockIdx.x * blockDim.x + threadIdx.x; if (idx < size) { - curand_init(seed + idx, 0, 0, &state[idx]); + curand_init(seed, idx, 0, &state[idx]); } }