Closed
Conversation
While it is possible to change the number of threads used by FFTW plans with `set_num_threads`, it is impossible to see what the current value is. This is made difficult because FFTW3 does not, as far as I know, provide a way to do this. However, caching the last argument passed to `set_num_threads` as a constant in FFTW.jl allows later access. I have added a constant, `PLAN_NUM_THREADS` to keep track of the last argument to `set_num_threads`, modified `set_num_threads` to update this constant, and added a function `get_num_threads` to access the constant.
Member
|
This is reasonable, but I would ideally like to fix this in the FFTW C library; otherwise in principle this could return the wrong result if a C library links to FFTW and changes this. https://github.com/FFTW/fftw3/blob/516116615362334c2051a16ec1658a888573ab63/threads/api.c#L70-L81 is where a new function |
Contributor
Author
|
I will attempt to add this to the FFTW C library instead of caching it in Julia (FFTW/fftw3#205). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While it is possible to change the number of threads used by FFTW plans with
set_num_threads, it is impossible to see what the current value is. This ismade difficult because FFTW3 does not, as far as I know, provide a way to do
this. However, caching the last argument passed to
set_num_threadsas aconstant in FFTW.jl allows later access. I have added a constant,
PLAN_NUM_THREADSto keep track of the last argument toset_num_threads,modified
set_num_threadsto update this constant, and added a functionget_num_threadsto access the constant.Closes #117