diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-08 11:03:34 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-08 11:03:34 -0400 |
commit | 8f3f0a9ca7d7fcaffc53a64798d2427342662115 (patch) | |
tree | cbb1d52835b502850451e4a359ab767dad3d1b19 /gpu.py | |
parent | f6109fc8939c55a9ef8244806d00b3ee07ee1b13 (diff) | |
parent | eaab42dc0711d1d301207c591d7ded343342977c (diff) | |
download | chroma-8f3f0a9ca7d7fcaffc53a64798d2427342662115.tar.gz chroma-8f3f0a9ca7d7fcaffc53a64798d2427342662115.tar.bz2 chroma-8f3f0a9ca7d7fcaffc53a64798d2427342662115.zip |
merge heads
Diffstat (limited to 'gpu.py')
-rw-r--r-- | gpu.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -205,12 +205,12 @@ class GPU(object): self.wavelengths_gpu = gpuarray.to_gpu(wavelength.astype(np.float32)) self.times_gpu = gpuarray.to_gpu(t0.astype(np.float32)) - if histories: + if histories is not None: self.histories_gpu = gpuarray.to_gpu(histories.astype(np.uint32)) else: self.histories_gpu = gpuarray.zeros(self.nphotons, dtype=np.uint32) - if last_hit_triangles: + if last_hit_triangles is not None: self.last_hit_triangles_gpu = gpuarray.to_gpu(last_hit_triangles.astype(np.int32)) else: self.last_hit_triangles_gpu = gpuarray.empty(self.nphotons, dtype=np.int32) @@ -241,7 +241,7 @@ class GPU(object): ''' return { 'pos' : self.positions_gpu.get().view(np.float32).reshape(self.positions_gpu.size, 3), 'dir' : self.directions_gpu.get().view(np.float32).reshape(self.directions_gpu.size, 3), - 'pol' : self.polarizations_gpu.get().view(np.float32).reshape(self.polarization_gpu.size, 3), + 'pol' : self.polarizations_gpu.get().view(np.float32).reshape(self.polarizations_gpu.size, 3), 'wavelength' : self.wavelengths_gpu.get(), 't0' : self.times_gpu.get(), 'histories' : self.histories_gpu.get(), |