From 41aa427f087c16b25838816079d53658c38392ea Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Thu, 18 Dec 2014 00:29:28 -0800 Subject: [PATCH] Fix array-ordering issue --- cuburn/code/mwc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cuburn/code/mwc.py b/cuburn/code/mwc.py index 2790029..dc12c32 100644 --- a/cuburn/code/mwc.py +++ b/cuburn/code/mwc.py @@ -37,12 +37,12 @@ def make_seeds(nthreads, host_seed=None): rand = np.random # Create the seed structures. TODO: check that struct is 4-byte aligned - seeds = np.empty((3, nthreads), dtype=np.uint32, order='F') - seeds[0][:] = mults[:nthreads] + seeds = np.empty((nthreads, 3), dtype=np.uint32) + seeds[:,0] = mults[:nthreads] # Excludes 0xffffffff for 32-bit compatibility with laziness - seeds[1] = rand.randint(1, 0x7fffffff, size=nthreads) - seeds[2] = rand.randint(1, 0x7fffffff, size=nthreads) + seeds[:,1] = rand.randint(1, 0x7fffffff, size=nthreads) + seeds[:,2] = rand.randint(1, 0x7fffffff, size=nthreads) return seeds