#pragma once

#ifdef __cplusplus

extern "C"
{
	void CreateCudaStream();
	void DestroyCudaStream();

	void Fft(unsigned int n, float *data, float *spectrum);
	void IFft(unsigned int n, float *spectrum, float *data);
	void FftD(unsigned int n, double *data, double *spectrum);
	void IFftD(unsigned int n, double *spectrum, double *data);

	void Fft2(unsigned int w, unsigned int h, float *data, float *spectrum);
	void IFft2(unsigned int w, unsigned int h, float *spectrum, float *data);
	void Fft2D(unsigned int w, unsigned int h, double *data, double *spectrum);
	void IFft2D(unsigned int w, unsigned int h, double *spectrum, double *data);

	void FftC(unsigned int n, std::complex<float> *data, std::complex<float> *spectrum);
	void IFftC(unsigned int n, std::complex<float> *spectrum, std::complex<float> *data);
	void FftCD(unsigned int n, std::complex<double> *data, std::complex<double> *spectrum);
	void IFftCD(unsigned int n, std::complex<double> *spectrum, std::complex<double> *data);

	void Fft2C(unsigned int w, unsigned int h, std::complex<float> *data, std::complex<float> *spectrum);
	void IFft2C(unsigned int w, unsigned int h, std::complex<float> *spectrum, std::complex<float> *data);
	void Fft2CD(unsigned int w, unsigned int h, std::complex<double> *data, std::complex<double> *spectrum);
	void IFft2CD(unsigned int w, unsigned int h, std::complex<double> *spectrum, std::complex<double> *data);
}

#else

void CreateCudaStream();
void DestroyCudaStream();

void Fft(unsigned int n, float *data, float *spectrum);
void IFft(unsigned int n, float *spectrum, float *data);
void FftD(unsigned int n, double *data, double *spectrum);
void IFftD(unsigned int n, double *spectrum, double *data);

void Fft2(unsigned int w, unsigned int h, float *data, float *spectrum);
void IFft2(unsigned int w, unsigned int h, float *spectrum, float *data);
void Fft2D(unsigned int w, unsigned int h, double *data, double *spectrum);
void IFft2D(unsigned int w, unsigned int h, double *spectrum, double *data);

void FftC(unsigned int n, float complex *data, float complex *spectrum);
void IFftC(unsigned int n, float complex *spectrum, float complex *data);
void FftCD(unsigned int n, double complex *data, double complex *spectrum);
void IFftCD(unsigned int n, double complex *spectrum, double complex *data);

void Fft2C(unsigned int w, unsigned int h, float complex *data, float complex *spectrum);
void IFft2C(unsigned int w, unsigned int h, float complex *spectrum, float complex *data);
void Fft2CD(unsigned int w, unsigned int h, double complex *data, double complex *spectrum);
void IFft2CD(unsigned int w, unsigned int h, double complex *spectrum, double complex *data);

#endif

