fftwwrapper.h

来自「对 FFTW 的 c++ 封装」· C头文件 代码 · 共 38 行

H
38
字号
// FFTWWrapper.h: interface for the CFFTWWrapper class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_FFTWWRAPPER_H____INCLUDED_)
#define AFX_FFTWWRAPPER_H____INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "fftw3.h"

#define FFT_DIRECTION_FORWARD FFTW_FORWARD
#define FFT_DIRECTION_BACKWARD FFTW_BACKWARD

class CFFTWWrapper  
{
public:
	CFFTWWrapper();
	virtual ~CFFTWWrapper();

	fftw_complex*	AllocateMemory(fftw_complex* fftw_cmplx, int size);
	fftw_complex* 	DeAllocateMemory(fftw_complex* fftw_cmplx);
	double			GetReal(fftw_complex* fftw_cmplx, int index);
	void			SetReal(fftw_complex* fftw_cmplx, int index, double value);
	void			SetImaginary(fftw_complex* fftw_cmplx, int index, double value);
	double			GetImaginary(fftw_complex* fftw_cmplx, int index);
	void			CreatePlan(fftw_plan* plan,
								int width, int height,
								fftw_complex* in, fftw_complex* out, int direction);
	void			ExecutePlan(fftw_plan* plan);
	void			DestroyPlan(fftw_plan* plan);

};

#endif // !defined(AFX_FFTWWRAPPER_H____INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?