summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpu.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gpu.py b/gpu.py
index 0f56ee4..ed8ca12 100644
--- a/gpu.py
+++ b/gpu.py
@@ -72,13 +72,15 @@ class GPU(object):
device = cuda.Device(device_id)
self.context = device.make_context()
print 'device %s' % self.context.get_device().name()
- self.module = SourceModule(src.kernel, options=['-I' + src.dir], no_extern_c=True)
+ cuda_options = ['-I' + src.dir, '--use_fast_math']
+
+ self.module = SourceModule(src.kernel, options=cuda_options, no_extern_c=True)
self.geo_funcs = CUDAFuncs(self.module, ['set_wavelength_range', 'set_material', 'set_surface', 'set_global_mesh_variables', 'color_solids'])
self.prop_funcs = CUDAFuncs(self.module, ['init_rng', 'propagate'])
self.nthread_per_block = 64
self.max_blocks = 1024
- self.daq_module = SourceModule(src.daq, options=['-I' + src.dir], no_extern_c=True)
+ self.daq_module = SourceModule(src.daq, options=cuda_options, no_extern_c=True)
self.daq_funcs = CUDAFuncs(self.daq_module,
['reset_earliest_time_int', 'run_daq',
'convert_sortable_int_to_float'])