Skip to content

Commit

Permalink
fixes one of the bugs in the spike holes problem #594
Browse files Browse the repository at this point in the history
  • Loading branch information
marius10p committed Apr 8, 2024
1 parent 2bf0539 commit 8a74064
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CUDA/mexMPnu8.cu
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,11 @@ __global__ void bestFilter(const double *Params, const float *data,
if (Cf > Cnextbest + 1e-6)
Cnextbest = Cf;
}
err[tid0] = Cbest;
eloss[tid0] = Cbest - Cnextbest;
ftype[tid0] = ibest;
if (tid0>=nt0){
err[tid0] = Cbest;
eloss[tid0] = Cbest - Cnextbest;
ftype[tid0] = ibest;
}

tid0 += blockDim.x * gridDim.x;
}
Expand All @@ -348,7 +350,7 @@ __global__ void bestFilterUpdate(const double *Params, const float *data,

if (ind<counter[0]){
t = st[ind]-nt0 + tid;
if (t>=0 && t<NT){
if (t>=nt0 && t<NT){
Cbest = 0.0f;
for (i=0; i<Nfilt;i++){
a = 1+ lam;
Expand Down

0 comments on commit 8a74064

Please sign in to comment.