-
Notifications
You must be signed in to change notification settings - Fork 24
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
CPP support #8
Comments
It was designed to be included only once, in a source file that in turn provides a less primitive interface to the rest of the application. This is not really a common way of doing things, but something I personally like for libraries having mostly low-level primitives that are typically never called alone in any given application. So one correct way of doing it would be like I use it - import it once and build interfaces more specific to your application that are then used elsewhere. Another (probably more correct) way would be to refactor the project to have methods in .c files. I think this is the only way to make the library widely compatible with various environments. |
Actually, that means create proxy-methods for all your function. Possible, but strange. I'm ready to use this approach as "plan B" if nothing better possible. Note, i don't like to create fork. I wish to improve usability of this repo as much as possible (as much as we can have consensus), and then will do the rest at my side.
How is that acceptable for you? If yes - that would be ideal. One more idea. You can split out functions to #include "fft.h"
#include "../src/fft.c" If anyone wish to use lib as single |
No, not proxy functions - not the way that I use it. For a specific application, one will typically use some sequence involving multiple SYLT-FFT primitives, and that algorithm is what I export from my "allthingsfft.c" which includes fft.h but is custom-built for each application. None of the primitive fft.h functions are exported since they are seldom directly useful to the application. As an example - you are writing an application that needs to do something as common as FFT on real data for visualization purposes. Here, FFT output data is not immediately useful, but must be converted from vectors to phase+magnitude, while input data must be processed into complex form before an FFT can be performed. I don't mind refactoring the project to make it more useful or standard, the pros outweigh the cons. I mean, the reason I put this up at all is that I want people to benefit from it, and making that easier is a good thing. |
I have cpp project, and need to include
fft.h
into multiple files. Got build error:And the same for multiple function.
Temporary fixed by add
__INLINE
to all fn declarations. But not sure how correct is that.I understand (and agree with) your wish to keep everything in
.h
for simple use. Could you suggest a right fix?Also, not sure, but probably worth to add
Into all header files
The text was updated successfully, but these errors were encountered: