Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C backend for PocketFFT #4

Merged
merged 18 commits into from
Mar 4, 2024
Merged

C backend for PocketFFT #4

merged 18 commits into from
Mar 4, 2024

Conversation

Vindaar
Copy link
Member

@Vindaar Vindaar commented Feb 28, 2024

Adds C backend support for PocketFFT. Uses the C library directly and builds it statically with the Nim project.

Selection of the appropriate backend for C or C++ targets is done in impulse/fft/pocketfft.nim automatically. It's maybe not fully ideal, because their APIs are not a drop in replacement for the other.

@AngelEzquerra
Copy link
Contributor

Adds C backend support for PocketFFT. Uses the C library directly and builds it statically with the Nim project.

Selection of the appropriate backend for C or C++ targets is done in impulse/fft/pocketfft.nim automatically. It's maybe not fully ideal, because their APIs are not a drop in replacement for the other.

This is really great! I tried the new C backend on Windows and it seems to work find (and gives the same results as numpy.fft in the few small tests I did).

As we discussed, ideally this would be moved up a level so that users can just import impulse/fft.

In a future PR we could add support for the same normalization options supported by numpy. We could also add a separate real_fft that takes and outputs real values, while the regular fft should always return complex values.

@Vindaar Vindaar merged commit e5d708b into master Mar 4, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants