32-bit compatibility (I think?)

This commit is contained in:
Steven Robertson 2011-10-13 16:56:20 -04:00
parent 14872ee6ed
commit b168a2431e
2 changed files with 4 additions and 5 deletions

View File

@ -60,10 +60,9 @@ __device__ float mwc_next_11(mwc_st &st) {
rand.shuffle(mults) rand.shuffle(mults)
seeds[0][:] = mults[:nthreads] seeds[0][:] = mults[:nthreads]
# Intentionally excludes both 0 and (2^32-1), as they can lead to # Excludes 0xffffffff for 32-bit compatibility with laziness
# degenerate sequences of period 0 seeds[1] = rand.randint(1, 0x7fffffff, size=nthreads)
seeds[1] = rand.randint(1, 0xffffffff, size=nthreads) seeds[2] = rand.randint(1, 0x7fffffff, size=nthreads)
seeds[2] = rand.randint(1, 0xffffffff, size=nthreads)
return seeds return seeds

View File

@ -364,7 +364,7 @@ class _AnimRenderer(object):
cuda.memcpy_htod_async(d_info_off, h_infos, stream) cuda.memcpy_htod_async(d_info_off, h_infos, stream)
# TODO: get block config from IterCode # TODO: get block config from IterCode
iter_fun(d_seeds, np.uint64(d_info_off), self.d_accum, iter_fun(d_seeds, np.uintp(d_info_off), self.d_accum,
block=(32, 16, 1), grid=(len(block_times), 1), block=(32, 16, 1), grid=(len(block_times), 1),
texrefs=[tref], stream=stream) texrefs=[tref], stream=stream)