From 10f8e10b73dbf88f244cb83dbdec5e80d89ee658 Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Thu, 18 Aug 2011 19:28:32 -0400 Subject: Could have run off the end of the array by 1 because the queue counter points to the next available photon slot. --- gpu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpu.py b/gpu.py index 372bc7b..4eb2fab 100644 --- a/gpu.py +++ b/gpu.py @@ -308,7 +308,7 @@ class GPU(object): input_queue_gpu = output_queue_gpu output_queue_gpu = temp output_queue_gpu[:1].set(np.uint32(1)) - nphotons = input_queue_gpu[:1].get()[0] + nphotons = input_queue_gpu[:1].get()[0] - 1 if gpuarray.max(self.histories_gpu).get() & (1 << 31): print >>sys.stderr, "WARNING: ABORTED PHOTONS IN THIS EVENT" -- cgit