cuda random number initialization - same seed different sequence for each state
This commit is contained in:
@ -8,7 +8,7 @@ __global__ void initcuRandState(curandState *state, int size, int seed = 0) {
|
|||||||
|
|
||||||
int idx = blockIdx.x * blockDim.x + threadIdx.x;
|
int idx = blockIdx.x * blockDim.x + threadIdx.x;
|
||||||
if (idx < size) {
|
if (idx < size) {
|
||||||
curand_init(seed + idx, 0, 0, &state[idx]);
|
curand_init(seed, idx, 0, &state[idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user