프로그램 사용/fft, fftw
fftw plan
구차니
2023. 3. 31. 11:17
fftw를 이용하여 fft 연산을 하려고 하면
fft_plan_dft*() 함수로 plan을 만들고 (이 과정에서 input, output 포인터 지정)
fftw_execute() 함수로 fft 연산을 한다.
fft_plan_dft_*() 함수만 해도 수행에 꽤 시간이 걸리는 관계로
포인터를 바꾸어서 다시 할당할게 아니라.. 메모리 복사를 한번 더 하고
plan에 지정된 포인터를 재사용 하는게 cpu 점유율을 낮추는 방법이 될 것 같다.
Plans for all transform types in FFTW are stored as type fftw_plan (an opaque pointer type), and are created by one of the various planning routines described in the following sections. An fftw_plan contains all information necessary to compute the transform, including the pointers to the input and output arrays. |