summaryrefslogtreecommitdiff
path: root/gpu.py
diff options
context:
space:
mode:
Diffstat (limited to 'gpu.py')
-rw-r--r--gpu.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gpu.py b/gpu.py
index ed8ca12..e6b6856 100644
--- a/gpu.py
+++ b/gpu.py
@@ -259,7 +259,8 @@ class GPU(object):
block=(self.nthread_per_block,1,1),
grid=(blocks, 1))
- #self.context.synchronize()
+ if 'profile' in __builtins__:
+ self.context.synchronize()
def get_photons(self):
'''Returns a dictionary of current photon state information.
@@ -311,7 +312,8 @@ class GPU(object):
self.earliest_time_gpu,
block=(self.nthread_per_block,1,1),
grid=(len(self.earliest_time_int_gpu)//self.nthread_per_block+1,1))
- #self.context.synchronize()
+ if 'profile' in __builtins__:
+ self.context.synchronize()
def get_hits(self):