Difference between revisions of "Applications/Fftw3"

From HPC
Jump to: navigation , search
m (Pysdlb moved page Fftw3 to Applications/Fftw3 without leaving a redirect)
m (Further Information)
 
Line 50: Line 50:
 
* [http://www.fftw.org/ http://www.fftw.org/]
 
* [http://www.fftw.org/ http://www.fftw.org/]
  
{|
+
{{Librariespagenav}}
|style="width:5%; border-width: 0" | [[File:icon_home.png]]
 
|style="width:95%; border-width: 0" |
 
* [[Main_Page|Home]]
 
* [[Applications|Application support]]
 
* [[General|General]]
 
* [[Training|Training]]
 
* [[Programming|Programming support]]
 
|-
 
|}
 

Latest revision as of 11:05, 16 November 2022

Application Details

  • Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data
  • Version: 3.3.5 (compiled with gcc)
  • Module: fftw3/gcc/3.3.5
  • Licence: GNU

Usage

FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).

Module

[username@login01 ~]$ module add fftw3/gcc/3.3.5

Compilation

fftw3 is a library required at compilation time.

A typical code snippet requiring is shown below:


#include <fftw3.h>
...
{
    fftw_complex *in, *out;
    fftw_plan p;
    ...
    in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
    out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
    p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
    ...
    fftw_execute(p); /* repeat as needed */
    ...
    fftw_destroy_plan(p);
    fftw_free(in); fftw_free(out);
}

You must link this code with the fftw3 library. On Viper, link with -lfftw3 -lm.


Further Information





Libraries | Main Page | Further Topics