-
Notifications
You must be signed in to change notification settings - Fork 10
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
call to NativeMethods.fftwf_sprint_plan(handle); crashes #3
Comments
Adding [return: MarshalAs(UnmanagedType.LPStr)]
public static extern string fftw_sprint_plan(IntPtr plan); I'll update the code later today. |
Great! Thank you for fixing it so quickly. |
unfortunately it still crashes with this change! try it! |
I tested it before committing the fix. It works for me. Which platform are you on, which FFTW dll are you using? Could you - just for testing purpose - change the method to return an [DllImport(Library, EntryPoint = "fftw_sprint_plan", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr fftw_sprint_plan(IntPtr plan); |
I am on Windows x64. Using the precompiled dlls available on FFTW website. returning an IntPtr followed by Marshal.PtrToStringAnsi worked for me. |
Alright, I'm using the recent FFTW 3.3.10 compiled with Visual Studio 2022. |
could you share the link to the binary? i can only find fftw-3.3.5-dll64 on official website. |
There's a link in the readme, pointing to version 3.3.9 with only SSE2 enabled: http://wo80.bplaced.net/math/packages-fftw.html I compiled my local version with AVX2 only, if I remember correctly. I'll upload it, if you are interested. The CMake build script has it's pitfalls (SSE/AVX wasn't detected automatically for me), but it's not too hard to get it working, so you could also try to compile the code for yourself. |
thanks for the link and for making fftw accessible to C# developers! |
Thanks a lot for this library. The call to
NativeMethods.fftwf_sprint_plan(handle);
crashes however. Any chance you could fix this?The text was updated successfully, but these errors were encountered: