Questions tagged [fftw]

FFTW, "The Fastest Fourier Transform in The West", is a C library which implements discrete Fourier Transforms. It is licensed under the GNU GPL.

FFTW homepage: http://www.fftw.org/
FAQ: http://www.fftw.org/faq/

883 questions
5
votes
1 answer

Quaternion FFT using 1D FFT in C++

I am currently implemented research paper that use a Quaternion FFT in c++. However, I could not find any C++ library that support Quaternion FFT. After some surveys, I have found someone on the Internet said that it is possible to convert…
wlee
  • 97
  • 7
5
votes
1 answer

FFT output is blank when using FFTW_MEASURE, but works fine with FFTW_ESTIMATE

I'm having the following issue in my attempt to use fftw3. For some reason, whenever I do an FFT using FFTW_MEASURE instead of FFTW_ESTIMATE, I get blank output. Ultimately I'm trying to implement fft convolution, so my example below includes both…
5
votes
2 answers

fatal error C1047 in release build only

My project uses Visual Studio 2012, and I am using the libfftw-3.3.lib as coming from their page. When I build my project in debug, it links and compiles just fine, and I get a working application. When I set it to release mode, the linker gives me…
SinisterMJ
  • 3,425
  • 2
  • 33
  • 53
5
votes
1 answer

Using fftw with column major square matrices (armadillo library)

I find the armadillo C++ library very convenient for matrix computations. How does one perform a two dimensional FFT on armadillo matrices using the FFTW library? I understand that armadillo matrix class stores data in a column major order. How do I…
userJ
  • 159
  • 2
  • 8
5
votes
1 answer

Why is cuFFT so slow?

I'm hoping to accelerate a computer vision application that computes many FFTs using FFTW and OpenMP on an Intel CPU. However, for a variety of FFT problem sizes, I've found that cuFFT is slower than FFTW with OpenMP. In the experiments and…
solvingPuzzles
  • 8,541
  • 16
  • 69
  • 112
5
votes
2 answers

FFTW: size of output array for 2D Fourier Transform of 3D data

I have a real 3D array of dimensions Nx*Ny*Nz and want to take a 2D Fourier transform for each z value using FFTW. Here the z index is the fastest varying in memory. Currently the following code works as expected: int Nx = 16; int Ny = 8; int Nz =…
Hemmer
  • 1,366
  • 1
  • 18
  • 33
5
votes
2 answers

FFTW - computing real 2D FFT, special requirements

I'm using FFTW3 to compute 2D real FFT in c++. I've read the manual but have some questions. From the manual: http://www.fftw.org/fftw3_doc/One_002dDimensional-DFTs-of-Real-Data.html#One_002dDimensional-DFTs-of-Real-Data In exchange for these speed…
tir38
  • 9,810
  • 10
  • 64
  • 107
4
votes
2 answers

Thread IDs with PPL and Parallel Memory Allocation

I have a question about the Microsoft PPL library, and parallel programming in general. I am using FFTW to perform a large set (100,000) of 64 x 64 x 64 FFTs and inverse FFTs. In my current implementation, I use a parallel for loop and allocate the…
Kyle Lynch
  • 235
  • 1
  • 3
  • 6
4
votes
1 answer

Using FFTWLib (C#): Using fftw.dft_r2c_2d() crashes vshost.exe, or main program if vshost is not running

As the title states: I'm trying to use Tamas Szalay's C# port of FFTW in Visual C# 2010 Professional (Trial), and I'm getting the above error when I try to use a two-dimensional transform. (The problem persists when I switch to dft_c2r_2d()). Other…
linkhyrule5
  • 871
  • 13
  • 29
4
votes
1 answer

Solve Poisson's equation with FFTW, MPI and C programming language

Currently I am trying to implement a 3D solver for Poisson's equation thanks to the FFTW3 library and with MPI in C. My problem consists on solving the problem in Fourier space and then perform a backward transform which allows me to get the…
steven
  • 41
  • 3
4
votes
1 answer

C++: Attemping to use std::rotate with fftw_complex data yields error: "array must be initialized with a brace-enclosed initializer"

I am trying to understand how to utilize the fft to process data I capture with a software defined radio. I discovered C++'s fftw3 library and attempted to look up some documentation or tutorials, and found there wasn't a whole ton to go off of. I…
4
votes
2 answers

FFTW single-precision library outputs incorrect DFT when using SIMD optimizations

I'm testing the FFTW 3.3.8 C library for 1D Discrete Fourier Transform (DFT) calculations. The results I get are often incorrect when I use the float (single-precision) version of the libraries, configured with the --enable-generic-simd128 or…
Puk
  • 225
  • 2
  • 7
4
votes
0 answers

Compare FFT speed of python (scipy and pyfftw packages) and matlab

I compared the speed of FFT using different methods in python and matlab, the results looked a little weird and I didn't know if I did it right. The code in python are as follows: from scipy import fft import pyfftw import numpy as np from timeit…
shz
  • 159
  • 8
4
votes
2 answers

FFTW results differ from FFT in MATLAB

I compare the forward FFT using FFTW and MATLAB fft. The input signal is a Gaussian. Code: FFTW using C: float *signal; /*input signal*/ int nt; /*length of the signal*/ fftw_complex *in, *out; fftw_plan plan1; in =…
clduan
  • 41
  • 1
4
votes
2 answers

Two Dimensional FFTW Help

I'm currently trying to compute the fft of an image via fftw_plan_dft_2d. To use this function, I'm linearizing the image data into an in array and calling the function mentioned above (and detailed below) ftw_plan fftw_plan_dft_2d(int n0, int n1, …
djs22
  • 1,148
  • 3
  • 14
  • 30