File: testfftw.rb

package info (click to toggle)
libnarray-ruby 0.5.9p7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 432 kB
  • ctags: 517
  • sloc: ansic: 4,412; ruby: 1,281; python: 91; makefile: 5
file content (16 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'narray'

x = NArray.complex(1024,1024).indgen!

p x
puts 'executing fftw ...'
t1 = Time.times.utime
y = FFTW.fftw( x, 1 )
t2 = Time.times.utime
print "time: ",t2 - t1,"\n"
p y

exit

x = NArray.complex(128,128).indgen!
10000.times{ x = FFTW.fftw( x, 1 ) }