Skip to content

lloda/guile-ffi-fftw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

guile-ffi-fftw

This is a minimal set of Guile FFI bindings for FFTW's ‘guru interface’, www.fftw.org/fftw3_doc/Guru-Interface.html#Guru-Interface

It provides two functions:

  • fftw-dft! rank sign in out
  • fftw-dft rank sign in

These bindings being minimal, there is no support for computing & reusing plans, or split r/i transforms, or anything other than straight complex DFTs. Contributions are welcome!

I think the bindings provide a good example of how to interface from Guile with array libraries taking dense arrays as arguments. FFTW is nice in this respect, because it supports arbitrary strides —which should be the norm really!

There is another set of bindings by Mikael Djurfeldt,

https://savannah.gnu.org/projects/guile-fftw

But it only does up to 2D DFTs and is particular about array strides (based on my reading of the code), while fftw-dft! and fftw-dft do DFTs of any rank and place no restriction on strides. This comes through no effort on my part; it is a feature of FFTW's. Also guile-ffi-fftw uses the FFI, while guile-fftw uses a C extension, which you need to build, etc.

Running the tests

The tests use SRFI-64.

$GUILE -L mod -s test/test-ffi-fftw.scm

Releases

No releases published

Packages

No packages published

Languages