mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Fix array-ordering issue
This commit is contained in:
parent
d832b6bc98
commit
41aa427f08
@ -37,12 +37,12 @@ def make_seeds(nthreads, host_seed=None):
|
|||||||
rand = np.random
|
rand = np.random
|
||||||
|
|
||||||
# Create the seed structures. TODO: check that struct is 4-byte aligned
|
# Create the seed structures. TODO: check that struct is 4-byte aligned
|
||||||
seeds = np.empty((3, nthreads), dtype=np.uint32, order='F')
|
seeds = np.empty((nthreads, 3), dtype=np.uint32)
|
||||||
seeds[0][:] = mults[:nthreads]
|
seeds[:,0] = mults[:nthreads]
|
||||||
|
|
||||||
# Excludes 0xffffffff for 32-bit compatibility with laziness
|
# Excludes 0xffffffff for 32-bit compatibility with laziness
|
||||||
seeds[1] = rand.randint(1, 0x7fffffff, size=nthreads)
|
seeds[:,1] = rand.randint(1, 0x7fffffff, size=nthreads)
|
||||||
seeds[2] = rand.randint(1, 0x7fffffff, size=nthreads)
|
seeds[:,2] = rand.randint(1, 0x7fffffff, size=nthreads)
|
||||||
|
|
||||||
return seeds
|
return seeds
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user