New real FFT routines

DSP, Plug-in and Host development discussion.
User avatar
KVRist
75 posts since 3 Jan, 2021

Post Wed Feb 03, 2021 9:43 am

DaveClark wrote:
Wed Feb 03, 2021 9:33 am
Another reason for choosing something else or writing one's own is that FFTW3 is almost impossible to debug, or at least I found that to be the case. Although the authors boldly claimed it was written in the "lingua franca" of the scientific community (C in case anyone like me thinks it was FORTRAN transitioning to C++ at that time, with C a distinct minority in science) the C code for the routines is machine-generated by Caml Light scripts and is effectively read-only. It might as well have been purposefully obfuscated The authors themselves have admitted that there are cases in which they don't know what the code is doing.

Now it's been many years since I considered all of this, so perhaps better information is out there and perhaps the most recent versions are eminently readable.
Well, if they wanted compile-time computing they could as well have stuck with Lisp.

It should be possible to make debug information that displays the appropriate Caml code instead of the generated C code in gdb, but there is little existing art out there.
Last edited by uOpt on Thu Feb 04, 2021 9:42 am, edited 1 time in total.

KVRAF
6235 posts since 12 Feb, 2006 from Helsinki, Finland

Post Wed Feb 03, 2021 12:37 pm

uOpt wrote:
Wed Feb 03, 2021 9:43 am
Well, if they wanted compile-time computing they could as well have stuck with Lisp.
My DustFFT is generated with a Lisp script. :)

edit: Although arguably the generated C-code is probably more readable than the script.
Preferred pronouns would be "it/it" because according to this country, I'm a piece of human trash.

KVRist
252 posts since 8 May, 2007

Post Thu Feb 04, 2021 9:18 am

uOpt wrote:
Wed Feb 03, 2021 9:43 am
I should be possible to make debug information that displays the appropriate Caml code instead of the generated C code in gdb, but there is little existing art out there.
I see that now OCaml is used, so perhaps this is possible? I don't recall that the Caml code was available back when I was trying to work with FFTW, and I'm not sure it would have been helpful. FFTW was crashing for certain block sizes, but not most block sizes. In my experience, troubleshooting this kind of thing requires descent down into a more detailed level, even if it can be fixed at a higher level.

Return to “DSP and Plug-in Development”