From 3b734034492a8a95bb4a2224353d8fbaf38fbd5b Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 30 Aug 2011 02:48:04 +0200 Subject: [PATCH] Fix RNG: Actually fill last entry of array of divisible-by-4 length. --- pyopencl/clrandom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyopencl/clrandom.py b/pyopencl/clrandom.py index ab4805b2..7710bc60 100644 --- a/pyopencl/clrandom.py +++ b/pyopencl/clrandom.py @@ -124,7 +124,7 @@ class RanluxGenerator(object): if (idx+2 < out_size) output[idx+2] = tail_ran.z; if (idx+3 < out_size) - output[idx+2] = tail_ran.w; + output[idx+3] = tail_ran.w; ranluxcl_upload_seed(&ranluxclstate, ranluxcltab); } -- GitLab