Implement FFT, both scalar and vectorized