Skip to content

Commit

Permalink
[bug] fix Apple silicon kernel JIT error, fix #102
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Oct 18, 2024
1 parent c646344 commit 126e53d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mmc_core.cl
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ typedef struct MMC_Parameter {
float4 bary0;
int e0;
int isextdet;
int framelen;
uint framelen;
uint maxpropdet;
uint normbuf;
int issaveseed;
Expand Down Expand Up @@ -484,7 +484,7 @@ __device__ inline float atomicadd(volatile __global float* address, const float
#endif

__device__ void clearpath(__local float* p, int len) {
uint i;
int i;

for (i = 0; i < len; i++) {
p[i] = 0.f;
Expand Down Expand Up @@ -1474,7 +1474,7 @@ __device__ void onephoton(unsigned int id, __local float* ppath, __constant MCXP
if (GPU_PARAM(gcfg, srctype) != stPattern || GPU_PARAM(gcfg, srcnum) == 1) {
ppath[GPU_PARAM(gcfg, reclen) - 1] = r.weight; /*last record in partialpath is the initial photon weight*/
} else if (GPU_PARAM(gcfg, srctype) == stPattern) {
*((uint*)(ppath + GPU_PARAM(gcfg, reclen) - 1)) = r.posidx;
*((__local uint*)(ppath + GPU_PARAM(gcfg, reclen) - 1)) = r.posidx;
}
}

Expand Down

0 comments on commit 126e53d

Please sign in to comment.