Comments (9)
Thank you for reporting the issue.
It's a pity MSVC behaves like that. About support - well, I would rather prefer for my library to adhere to standards, not to specific compilers...
In the meantime, please try to change a definition in minfft.h from
typedef double complex minfft_cmpl;
to
typedef _Dcomplex minfft_cmpl;
and see if it helps.
from minfft.
@beecksche did this solve the issue?
from minfft.
I've started to implement it, but hadn't time to test it yet.
Unfortunately it's not done with only replace typedef double complex minfft_cmpl
with typedef _Dcomplex minfft_cmpl
. I had to change some parts of the code aswell. I hope I can send a pull request end of the week with some pre-processor directives for MSVC compiler.
from minfft.
@aimukhin, Now, the code can be complied additonally in C++ with MSVC (2017 & 2019, 32bit & 64bit).
But I haven't tested it! You wrote, that you used the benchFFT. Do you have a code snippet, or a readme how to use benchFFT with minfft?
from minfft.
@beecksche minfft is included in the current master benchFFT
from minfft.
@beecksche I just pushed two commits that fix the library code for MSVC. Hopefully, changing double complex
to _Dcomplex
should be the only thing you have to do. Please try it and let me know.
from minfft.
That's awesome! Works perfectly, and a much more elegant way than mine.
In the header I also had to add
#ifdef __cplusplus
extern "C" {
#endif
...
#ifdef __cplusplus
}
#endif
for C++ compiling.
from minfft.
@beecksche I just pushed commits to further improve compatibility. If C99 complex is not available (as with MSVC), then minfft_cmpl is an array of two reals, which is binary compatible with _Dcomplex
and complex<double>
. You only have to cast pointers:
_Dcomplex z[N],w[N];
or
complex<double> z[N],w[N];
...
minfft_dft((minfft_cmpl*)z,(minfft_cmpl*)w,a);
Also I added extern "C" wrapper to the header file.
Hope you can now use the library without any modifications.
from minfft.
@aimukhin Awesome, worked perfectly.
from minfft.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minfft.