NFFT / nfft

The official NFFT library repository
https://tu-chemnitz.de/~potts/nfft/
GNU General Public License v2.0
174 stars 45 forks source link

added kernel der_laplacian_rbf #138

Closed wagnertheresa closed 5 months ago

jenskeiner commented 5 months ago

You could potentially use an unconditional multiplication likevalue = 1 - 2 ((x < 0.0) && (der % 2));to avoid the branching if statement. May be more efficient, but needs testing to find out.Am 12.04.2024 um 15:04 schrieb Michael Quellmalz @.***>: @michaelquellmalz approved this pull request.

In applications/fastsum/kernels.c:

@@ -431,6 +431,23 @@ C laplacian_rbf(R x, int der, const R param) / K(x)=EXP(-|x|/c) */ return value; }

+C der_laplacian_rbf(R x, int der, const R param) / K(x)=|x|/c EXP(-|x|/c) */ +{

You could also write if ((x < K(0.0)) && (der % 2)) value *= K(-1.0)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>