Skip to content

Commit

Permalink
[bug] further fix of multi-source replay, #215
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Mar 13, 2024
1 parent abdee14 commit e8cd4cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mcx_core.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,10 @@ __device__ inline int launchnewphoton(MCXpos* p, MCXdir* v, Stokes* s, MCXtime*
}
}

if (gcfg->issaveseed) {
copystate(t, photonseed);
}

if (gcfg->extrasrclen && gcfg->srcid != 1) {
if (gcfg->srcid > 1) {
launchsrc = (MCXSrc*)(gproperty + gcfg->maxmedia + 1 + gcfg->detnum + ((gcfg->srcid - 2) * 4));
Expand All @@ -1177,10 +1181,6 @@ __device__ inline int launchnewphoton(MCXpos* p, MCXdir* v, Stokes* s, MCXtime*
*idx1d = *((uint*)&launchsrc->param2.z); /**< pre-computed 1D index of the photon at launch for pencil/isotropic beams */
*mediaid = *((uint*)&launchsrc->param2.w); /**< pre-computed media index of the photon at launch for pencil/isotropic beams */

if (gcfg->issaveseed) {
copystate(t, photonseed);
}

*rv = float3(launchsrc->pos.x, launchsrc->pos.y, launchsrc->pos.z); //< reuse as the origin of the src, needed for focusable sources

if (issvmc) {
Expand Down

0 comments on commit e8cd4cd

Please sign in to comment.