Skip to content

Commit 8b4fadf

Browse files
committed
allow switching off ducc FFT optimization via #define
1 parent 632b335 commit 8b4fadf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/fft.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ void do_fft(FINUFFT_PLAN p, CPX *fwBatch) {
4141
axes.push_back(3);
4242
}
4343
ducc0::vfmav<CPX> data(fwBatch, arrdims);
44+
#ifdef FINUFFT_NO_DUCC0_TWEAKS
45+
ducc0::c2c(data, data, axes, p->fftSign < 0, FLT(1), nthreads);
46+
#else
4447
if (p->dim == 1) // 1D: no chance for FFT shortcuts
4548
ducc0::c2c(data, data, axes, p->fftSign < 0, FLT(1), nthreads);
4649
else if (p->dim == 2) { // 2D: do partial FFTs
@@ -96,6 +99,7 @@ void do_fft(FINUFFT_PLAN p, CPX *fwBatch) {
9699
}
97100
}
98101
}
102+
#endif
99103
delete[] ns;
100104
#else
101105
FFTW_EX(p->fftwPlan); // if thisBatchSize<batchSize it wastes some flops

0 commit comments

Comments
 (0)