Skip to content

Commit

Permalink
increased efficiency of computations
Browse files Browse the repository at this point in the history
  • Loading branch information
theresa committed Apr 16, 2024
1 parent 583def2 commit e1ef14c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions applications/fastsum/kernels.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,7 @@ C der_laplacian_rbf(R x, int der, const R *param) /* K(x)=|x|/c EXP(-|x|/c) *
case 0 : value = (FABS(x)/c)*EXP(-FABS(x)/c); break;
default:
value = (POW(K(-1.0),(R)der))*((FABS(x)-(R)der*c)/POW(c,(R)der+1))*EXP(-FABS(x)/c);
if (x < K(0.0))
value *= POW(K(-1.0),(R)der);
value *= 1 - 2 * ((x < K(0.0)) && (der % 2.0));
}

return value;
Expand Down

0 comments on commit e1ef14c

Please sign in to comment.