summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-08-05 18:28:23 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-08-05 18:28:23 -0400
commit643f3df7b8538d5c52ea782ec3c22406cadc7c6e (patch)
treec93b44285888c2500fd0d85d58ca688db2ebe9b7 /src
parent97467c888720451e97dcd0881d90f61641f43b47 (diff)
parentd7f835b3325611ad25209c9a25256b46d4944827 (diff)
downloadchroma-643f3df7b8538d5c52ea782ec3c22406cadc7c6e.tar.gz
chroma-643f3df7b8538d5c52ea782ec3c22406cadc7c6e.tar.bz2
chroma-643f3df7b8538d5c52ea782ec3c22406cadc7c6e.zip
merge heads
Diffstat (limited to 'src')
-rw-r--r--src/daq.cu7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/daq.cu b/src/daq.cu
index 07e2d5e..2b5f9b4 100644
--- a/src/daq.cu
+++ b/src/daq.cu
@@ -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);
}
}