Generalize FFT implementation onto CUDA backend