This forum has been archived. All content is frozen. Please use KDE Discuss instead.

FFTW3 alignment compatability

Tags: None
(comma "," separated)
stuart-macg
Registered Member
Posts
18
Karma
0
OS

FFTW3 alignment compatability

Fri Feb 25, 2011 4:48 am
Is eigen3 alignment equivalent to FFTW3 alignment, or is one more stringent than the other, or are they not compatible?

I want to give an existing templated fft_multi wrapper an eigen interface (it allocates and contains storage and gives a nice user interface to defining input and output stride patterns and mutex protects the non thread safe fftw plan generation).

I expect they are equivalent, but I would like to make sure.

(I'll have to check open mp vs posix threads compatibility too I suppose)
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: FFTW3 alignment compatability

Fri Feb 25, 2011 7:50 am
sorry I don't know much about FFTW, but let me explain how work Eigen. Eigen's Array and Matrix object stores elements in a purely sequential manner without any stride. You can declare column-major or row-major objects. The first element in (0,0) is aligned on a 16bytes boundary. Therefore if you have a column-major object, then the first element of each column will be aligned if and only nb_rows * sizeof(scalar) is a multiple of 16.

Then, you can also "map" any memory buffer as an Eigen object using Eigen::Map. In this case you can declare a "outer stride" which is the number of elements between two consecutive columns (or rows if row-major).

I don't know if that answer your question.

Btw, have you seen the FFT module in unsupported/ which already contains some wrappers for FFTW.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft