-
Notifications
You must be signed in to change notification settings - Fork 210
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
Is FFTS thread-safe? #64
Comments
This is not a bug-tracker issue, but a question. It's usually not good style to post such on an issue tracker. |
Let's issue-ify it; the documentation doesn't mention thread safety. |
Most To make all plans thread-safe we have to modify |
I would vote for minimal impact changes: no locks/mutexes. People using this library are advanced users, and can should be able to implement things correctly, without the library double checking everything you do. Same goes for the smart pointer idea. This is a C library, simply let the user deal with keeping track of wether a
ffts_plan_t *plan = ffts_init_2d(...);
// single threaded:
ffts_execute(plan, in, out);
// multi threaded:
size_t working_buffer_size = ffts_working_buffer_size(plan);
float *working_buffer = (float*) _mm_malloc(32, sizeof(float) * working_buffer_size);
ffts_execute_mt(plan, in, out, working_buffer); Do you think it is easy to implement something like this? |
Can I use a single
ffts_plan_t
object multiple times simultaneously from different threads usingffts_execute()
?The text was updated successfully, but these errors were encountered: