Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Neel Shah
NIFTy
Commits
97579c6e
Commit
97579c6e
authored
Oct 15, 2016
by
theos
Browse files
Made environmental variable NIFTY_FFTW_THREADS optional.
parent
7bcad43a
Changes
1
Show whitespace changes
Inline
Side-by-side
rg/nifty_fft.py
View file @
97579c6e
...
@@ -381,6 +381,11 @@ class _fftw_plan_and_info(object):
...
@@ -381,6 +381,11 @@ class _fftw_plan_and_info(object):
self
.
local_node_dimensions
,
self
.
local_node_dimensions
,
self
.
offsetQ
))
self
.
offsetQ
))
try
:
threads
=
int
(
os
.
environ
[
'NIFTY_FFTW_THREADS'
])
except
(
KeyError
):
threads
=
1
self
.
set_plan
(
self
.
set_plan
(
pyfftw
.
create_mpi_plan
(
pyfftw
.
create_mpi_plan
(
input_shape
=
self
.
global_input_shape
,
input_shape
=
self
.
global_input_shape
,
...
@@ -388,7 +393,7 @@ class _fftw_plan_and_info(object):
...
@@ -388,7 +393,7 @@ class _fftw_plan_and_info(object):
output_dtype
=
self
.
output_dtype
,
output_dtype
=
self
.
output_dtype
,
direction
=
self
.
direction
,
direction
=
self
.
direction
,
flags
=
[
"FFTW_ESTIMATE"
],
flags
=
[
"FFTW_ESTIMATE"
],
threads
=
int
(
os
.
environ
[
'MY_FFTW_THREADS'
])
,
threads
=
threads
,
**
kwargs
)
**
kwargs
)
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment