#include using namespace std; using namespace wfl; using namespace cwfl; int main(void) { //CWFL開始 StartCWFL("./FFT/FFT_test.log",1,true,0); //時間測定開始 EventTimer timer; timer.Start(); //512 x 512点,サンプリング間隔1[mm]の複素振幅分布をGPU上に生成 CudaWaveField cwf(512 , 512 , 1e-3); //1[cm] x 1[cm]の矩形開口を設定 cwf.SetRect(0.01,0.01); //フーリエ変換 cwf.Fft(-1); //正規化処理 cwf.Normalize(); //測定終了 timer.Stop(); Printf("GPU Elapsed time = %f[ms]\n",timer.GetTime()); //GPU上のデータをCPU側へ転送 WaveField wf; cwf >> wf; //bmpとしてセーブ wf.SaveAsBmp("./FFT/[GPU]RectFFT_AMPLITUDE.bmp",AMPLITUDE,COLOR); return 0; }