I'm writing a piece of code that uses FFTW3 library and wish to port it to GPU using CUDA. The easiest way to do this is to use cuFFTW compatibility library, but, as the documentation states, it's meant to completely replace the CPU version of FFTW with its GPU equivalent. After adding cufftw.h
header it replaces all the CPU functions and the code runs on GPU.
But is there a way to have both CPU and GPU versions of FFTW in my code so I can switch between them during runtime, e.g. via a checkbox in a user interface? Or is the only way to to this is to use native cuFFT API?