summaryrefslogtreecommitdiff
path: root/gputhread.py
diff options
context:
space:
mode:
Diffstat (limited to 'gputhread.py')
-rw-r--r--gputhread.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gputhread.py b/gputhread.py
index 3aa3cb2..0ee0155 100644
--- a/gputhread.py
+++ b/gputhread.py
@@ -75,8 +75,11 @@ class GPUThread(threading.Thread):
context = device.make_context()
module = SourceModule(src.kernel, options=['-I' + src.dir], no_extern_c=True, cache_dir=False)
propagate = module.get_function('propagate')
+ init_rng = module.get_function('init_rng')
texrefs = self.geometry.load(module)
+ init_rng(np.int32(1000000), np.int32(0), np.int32(0), block=(self.nblocks,1,1), grid=(1000000//self.nblocks,1))
+
while not self.stopped():
try:
job = self.jobs.get(block=False, timeout=0.5)