diff options
author | Stan Seibert <stan@mtrr.org> | 2011-08-04 11:52:31 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-08-04 11:52:31 -0400 |
commit | cf87548f09607927d49defa5c1bbb3e4fc877286 (patch) | |
tree | 6cbcba952e5f1e48afcda30e938ab4aeeba2cbc4 /src | |
parent | 125de2738868d30c537d84b471cfb5e8274fe6d8 (diff) | |
download | chroma-cf87548f09607927d49defa5c1bbb3e4fc877286.tar.gz chroma-cf87548f09607927d49defa5c1bbb3e4fc877286.tar.bz2 chroma-cf87548f09607927d49defa5c1bbb3e4fc877286.zip |
Don't draw a random time delta in the daq kernel unless it is necessary.
Diffstat (limited to 'src')
-rw-r--r-- | src/daq.cu | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -48,12 +48,13 @@ __global__ void run_daq(curandState *s, unsigned int detection_state, { int solid_id = solid_map[triangle_id]; int history = photon_histories[id]; - float time = photon_times[id] + curand_normal(&rng) * time_rms; - unsigned int time_int = float_to_sortable_int(time); if (solid_id < nsolids && (history & detection_state)) { - atomicMin(earliest_time_int + solid_id, time_int); + float time = photon_times[id] + curand_normal(&rng) * time_rms; + unsigned int time_int = float_to_sortable_int(time); + + atomicMin(earliest_time_int + solid_id, time_int); } } |