Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
testfft
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matthieu Boileau
testfft
Commits
3dc279c3
Commit
3dc279c3
authored
Feb 13, 2018
by
Matthieu Boileau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just layout
parent
6efeeeda
Changes
1
Hide whitespace changes
Inline
Sidebyside
Showing
1 changed file
with
12 additions
and
10 deletions
+12
10
testfft.py
testfft.py
+12
10
No files found.
testfft.py
View file @
3dc279c3
"""
Uncomment below to use 32 bit floats,
increasing the speed by a factor of 4
and remove the difference between the "builders" and "FFTW" methods
"""
import
time
import
numpy
import
pyfftw
import
multiprocessing
import
scipy.fftpack
nthread
=
10
#a = numpy.random.rand(2364,2756).astype('complex128')
"""
Uncomment below to use 32 bit floats,
increasing the speed by a factor of 4
and remove the difference between the "builders" and "FFTW" methods
"""
a
=
numpy
.
random
.
rand
(
2364
,
2756
).
astype
(
'complex64'
)
#a = numpy.random.rand(2364,2756).astype('complex64')
a
=
numpy
.
random
.
rand
(
2048
,
2048
).
astype
(
'complex64'
)
start
=
time
.
time
()
b1
=
numpy
.
fft
.
fft2
(
a
)
...
...
@@ 39,9 +41,9 @@ fft = pyfftw.FFTW( a, b4, axes=(0,1), direction='FFTW_FORWARD', flags=('FFTW_MEA
fft
()
end4
=
time
.
time
()

start
"""
For large arrays avoiding the copy is very important,
doing this I get a speedup of 2x compared to not using it
"""
For large arrays avoiding the copy is very important,
doing this I get a speedup of 2x compared to not using it
"""
pyfftw
.
forget_wisdom
()
start
=
time
.
time
()
...
...
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