Registered Member
|
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) |
Moderator
|
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. |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft