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

Can plan executions take &self instead of &mut self? #115

Open
dodomorandi opened this issue Aug 1, 2021 · 4 comments
Open

Can plan executions take &self instead of &mut self? #115

dodomorandi opened this issue Aug 1, 2021 · 4 comments

Comments

@dodomorandi
Copy link

I am asking this, because I am having a hard time trying to check whether this is possible or not. According to this documentation, execution of plans should take a const pointer to the plan (which AFAIK is nearly meaningless in the C world, because you are totally safe (ahem) to change nested values...).

Maybe it could be possible, but I am completely unable to hack through the code of FFTW3 to find the answer by myself. I could not find a similar question, therefore, even if c2c/r2c/c2r really need to use &mut self, at least there is an issue explicitly discussing this.

@miili
Copy link

miili commented Oct 24, 2021

Yes this should definitely work!

@miili
Copy link

miili commented Oct 24, 2021

Implemented in #117

@skailasa
Copy link

skailasa commented Jul 17, 2023

I'm attempting to do this, but getting the error that,

| |_________^ `*mut fftw_sys::fftw_plan_s` cannot be shared between threads safely

As plans don't implement Sync, required by rayon's parallel iterator

Edit, Oh I see it hasn't been merged into master, are there any plans to do this?

@miili
Copy link

miili commented Jul 17, 2023

I'd hope! The repo unfortunately looks unmaintained...

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

No branches or pull requests

3 participants