cuda - using FFTW compatablity mode in cuFFT -


i have full project created using fftw. want transition using cufft. understand cufft has "compatibility mode". how work? the cufft manual says:

after application working using fftw3 interface, users may want modify code move data , gpu , use routines documented in fftw conversion guide best performance.

does mean need change individual function calls? example, call cufftplan1d() instead of fftw_plan_dft_1d().

do have change data types?

    fftw_complex *inputdata;    // fftw data storage gets replaced..     cufft_complex *inputdata;   // ... cufft data storage?      fftw_plan forwardfft;       // fftw plan gets replaced...     cuffthandle forwardfft;     // ... cufft plan? 

if i'm going have rewrite of code, point of cufftsetcompatabilitymode(.)?

probably want cufftw interface cufft. suggest read documentation close have in mind. allow use cufft in fftw application minimum amount of changes. indicated in documentation, there should 2 steps requred:

  • it recommended replace include file fftw3.h cufftw.h
  • instead of linking double/single precision libraries such fftw3/fftw3f libraries, link both cufft , cufftw libraries

regarding doc item excerpted, step (moving data explicitly) not required if you're using cufftw compatibility interface. however, may not achieve maximum performance way. if want achieve maximum performance, may need use cufft natively, example can explicitly manage data movement. whether or not important depend on specific structure of application (how many fft's doing, , whether data shared amongst multiple ffts, example.) if intend use cufft natively, following comments apply:

yes, need change individual function calls. must line function names in api, associated header files, , library. fftw_ function names not in cufft library.

you can inspect data types , should discover basic data types float, double, complex, etc. should layout-compatible between cufft , fftw. recommend changing data types cufft data types, there should no functional or performance difference @ time.

although don't mention it, cufft require move data between cpu/host , gpu, concept not relevant fftw.

regarding cufftsetcompatibilitymode, function documentation , discussion of fftw compatibility mode pretty clear on it's purpose. has overall data layout, padding of data fftw.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -