Skip to content

Commit

Permalink
[bug] allow cudamex to pass replay demo, fix #98
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Nov 4, 2024
1 parent a6c2984 commit 36626f4
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/mmc_core.cl
Original file line number Diff line number Diff line change
Expand Up @@ -1673,24 +1673,11 @@ __device__ void onephoton(unsigned int id, __local float* ppath, __constant MCXP
#endif

if (r.eid <= 0) {
#if defined(MCX_SAVE_SEED) || defined(__NVCC__)

if (GPU_PARAM(gcfg, issaveseed)) {
if (GPU_PARAM(gcfg, isextdet) && type[oldeid - 1] == GPU_PARAM(gcfg, maxmedia) + 1) {
savedetphoton(n_det, detectedphoton, ppath, &r, gmed, oldeid, gcfg, photonseed, initseed);
} else {
savedetphoton(n_det, detectedphoton, ppath, &r, gmed, -1, gcfg, photonseed, initseed);
}
}

#if defined(MCX_SAVE_SEED) || defined(__NVCC__)
savedetphoton(n_det, detectedphoton, ppath, &r, gmed, ((GPU_PARAM(gcfg, isextdet) && type[oldeid - 1] == GPU_PARAM(gcfg, maxmedia) + 1) ? oldeid : -1), gcfg, photonseed, initseed);
#else

if (GPU_PARAM(gcfg, isextdet) && type[oldeid - 1] == GPU_PARAM(gcfg, maxmedia) + 1) {
savedetphoton(n_det, detectedphoton, ppath, &r, gmed, oldeid, gcfg, photonseed, NULL);
} else {
savedetphoton(n_det, detectedphoton, ppath, &r, gmed, -1, gcfg, photonseed, NULL);
}

savedetphoton(n_det, detectedphoton, ppath, &r, gmed, ((GPU_PARAM(gcfg, isextdet) && type[oldeid - 1] == GPU_PARAM(gcfg, maxmedia) + 1) ? oldeid : -1), gcfg, photonseed, NULL);
#endif
}

Expand Down

0 comments on commit 36626f4

Please sign in to comment.