Giter Site home page Giter Site logo

Issue/bug with 1D FFT/IFFT along third dimension of 3D matrix when FFTW_MEASURE or FFTW_PATIENT are used (FFTW_ESTIMATE works) about fftw3 HOT 5 CLOSED

fftw avatar fftw commented on June 30, 2024
Issue/bug with 1D FFT/IFFT along third dimension of 3D matrix when FFTW_MEASURE or FFTW_PATIENT are used (FFTW_ESTIMATE works)

from fftw3.

Comments (5)

rdolbeau avatar rdolbeau commented on June 30, 2024

I'm not sure the way you use fftw_execute_split_dft() is legit. It is quite sensitive to data placement. The comment in the source file is:
"/* guru interface: requires care in alignment, r - i, etcetera. */"

In particular, planning & executing on the same arrays in your code seems to work. Separate allocation with a fixed offset between real_* and imag_* (i.e. single allocation, fixed offsets) works as well (but only for forward or backward, you would need 2 plans).

from fftw3.

stevengj avatar stevengj commented on June 30, 2024

Yes, the split interface assumes that the re - im offset does not change between planning and execution. If you want to apply it to a different pair of arrays, the best way is to do a single fftw_malloc for both real and imaginary parts (with the first half being real and the second half being imaginary).

Thanks for looking at this, @rdolbeau

from fftw3.

stevengj avatar stevengj commented on June 30, 2024

In particular, the manual states the following requirement:

  • For split arrays, the separations between the real and imaginary parts, ii-ri and io-ro, are the same as they were for the input and output arrays when the plan was created. (This condition is automatically satisfied for interleaved arrays.)

from fftw3.

mlgill avatar mlgill commented on June 30, 2024

Thank you both for the response. I read the manual thoroughly, but I didn't realize what the statement in question meant. I'll let you know if I have further issues.

from fftw3.

mlgill avatar mlgill commented on June 30, 2024

As a quick followup, everything is now working correctly, so thank you again. I did have to create a separate IFFT plan for the scenario I'm using to correctly reflect the relative location in memory of real/imaginary data when their position is swapped in the execute command.

from fftw3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.