Skip to content

Commit 0b98843

Browse files
committed
1 parent 287671b commit 0b98843

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mcx_core.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,7 @@ __device__ inline int launchnewphoton(MCXpos* p, MCXdir* v, Stokes* s, MCXtime*
12511251
} else {
12521252
phi = TWO_PI * rand_uniform01(t);
12531253
}
1254+
12541255
sincosf(phi, &sphi, &cphi);
12551256

12561257
if (gcfg->srctype == MCX_SRC_DISK || gcfg->srctype == MCX_SRC_RING) {
@@ -1959,7 +1960,7 @@ __global__ void mcx_main_loop(uint media[], OutputType field[], float genergy[],
19591960
if (gcfg->outputtype == otEnergy) {
19601961
weight = w0 - p.w;
19611962
} else if (gcfg->outputtype == otFluence || gcfg->outputtype == otFlux) {
1962-
weight = (prop.mua * len < 0.001f) ? (w0 * len) : __fdividef(w0 - p.w, prop.mua); /** when mua->0, take limit_{mua->0} w0*(1-exp(-mua*len))/mua yields w0*len */
1963+
weight = (prop.mua < 0.001f) ? (w0 * len) : __fdividef(w0 - p.w, prop.mua); /** when mua->0, take limit_{mua->0} w0*(1-exp(-mua*len))/mua yields w0*len */
19631964
} else if (gcfg->seed == SEED_FROM_FILE) {
19641965
if (gcfg->outputtype == otJacobian || gcfg->outputtype == otRF) {
19651966
weight = replayweight[(idx * gcfg->threadphoton + min(idx, gcfg->oddphotons - 1) + (int)f.ndone)] * f.pathlen;

0 commit comments

Comments
 (0)