Git Product home page Git Product logo

go-fftw's Introduction

Go bindings for FFTW v3.2.2 Maintained by Jonathan Wills: [email protected] Feel free to email me patches, suggestions or bugs.

FFTW homepage: http://www.fftw.org/ Documentation for the latest version: http://www.fftw.org/fftw3_doc/

These bindings are incomplete, but should include enough functionality that you can do whatever transforms you need (perhaps not as easily as you would like, for now). The function definitions do not mirror exactly what is written in the docs. For example, passing arrays does not require passing the size of the arrays, and there is no need to garbage collect plans.

Usage: Here is an example of doing a simple DFT with these bindings

data := fftw.Alloc1d(64)  // Similar to calling make([]complex128, 64)
forward  := fftw.PlanDft1d(data, data, fftw.Forward, fftw.Estimate)
backward := fftw.PlanDft1d(data, data, fftw.Backward, fftw.Estimate)
// ... fill in data with something interesting
forward.Execute()  // Transforms data, in place, to frequency domain
// ... do something interesting with data
backward.Execute()  // Returns data, in place, to time domain

Calling fftw.Alloc1d(64) allows FFTW to allocate the memory so that it is properly aligned to take advantage of SIMDs. You could just use make([]complex128, size) if you want.

Installation: When installing fftw you must compile it as a shared library:

./configure --enable-shared
make
make install

Once installed properly, these bindings can be installed like so:

go get github.com/runningwild/go-fftw

go-fftw's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.