Skip to content

Commit

Permalink
fix photon sharing 0 output issue in negative patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Aug 7, 2023
1 parent 0800d0e commit 9aaba97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mcx_core.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ __global__ void mcx_main_loop(uint media[], OutputType field[], float genergy[],
#endif
} else {
for (int i = 0; i < gcfg->srcnum; i++) {
if (ppath[gcfg->w0offset + i] > 0.f) {
if (fabs(ppath[gcfg->w0offset + i]) > 0.f) {
#ifdef USE_DOUBLE
atomicAdd(& field[(idx1dold + tshift * gcfg->dimlen.z)*gcfg->srcnum + i], weight * ppath[gcfg->w0offset + i]);
#else
Expand Down

0 comments on commit 9aaba97

Please sign in to comment.