C++ify FFT functions