From octave-maintainers-request at bevo dot che dot wisc dot edu Thu Jan 29 13:57:45 2004 Subject: FFTW 3.x in Octave ( Was: Re: [Fwd: Re: rfftw slower than fftw for "bad" size arrays]) From: "Dmitri A. Sergatskov" To: "John W. Eaton" Cc: David Bateman , octave-maintainers@bevo.che.wisc.edu Date: Thu, 29 Jan 2004 12:57:28 -0700 John W. Eaton wrote: > On 29-Jan-2004, Dmitri A. Sergatskov wrote: > > | > Shouldn't we be using the latest version, if possible? > | > > | > I do remember the fftw malloc problem from some earlier attempt to use > | > fftw. If it is possible to avoid that, then we probably should. I > | > | It may or may not be related to http://fftw.org/faq/section3.html#leaks > | > | <<<< > | Question 3.15. FFTW seems to have a memory leak. > | After you create a plan, FFTW caches the information required to quickly > | recreate the plan. (See Q3.8 `Can I save FFTW's plans?') It also maintains > | a small amount of other persistent memory. You can deallocate all of FFTW's > | internally allocated memory, if you wish, by calling fftw_cleanup(), as > | documented in the manual. > | >>>> > > I was thinking there was someone who reported a bug related to the > 16-byte alignment requirement and who told me that I should switch to > using fftw_malloc for all of Octave, but I said that wasn't possible. > > jwe Well, according to http://www.fftw.org/fftw3_doc/SIMD-alignment-and-fftw_malloc.html#SIMD%20alignment%20and%20fftw_malloc <<<< You are not _required_ to use fftw_malloc. You can allocate your data in any way that you like, from malloc to new (in C++) to a static array declaration. If the array happens not to be properly aligned, FFTW will not use the SIMD extensions. >>>> Since fftw probably not the only package which would benefit from SIMD, I assume g++ people has some pressure to make "new" to do proper alignement... But except performance issue there is no requirement to do it everywhere. Sincerely, Dmitri.