首页 > 其他 > 详细

FFTW简介及使用

时间:2016-06-16 22:56:35      阅读:304      评论:0      收藏:0      [点我收藏+]

http://fftw.org/

FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).  We believe that FFTW, which is free software, should become the FFT library of choice for most applications.

 

在Windows+VS下使用FFTW

http://fftw.org/install/windows.html

这里有32和64位两个版本。

使用前先生成.lib:

     lib /def:libfftw3-3.def
     lib /def:libfftw3f-3.def
     lib /def:libfftw3l-3.def

64位

     lib /machine:x64 /def:libfftw3l-3.def

不带后缀的文件(libfftw3-3)是double版,f后缀是float,l后缀是long double。

配置vs project使用想要的lib。

具体函数参考official document:fftw3.pdf

注意不同版本的库,类型和函数名不一样。

例如float版的example就是(see fftw3.pdf first):

// 初始化只需一次

fftwf_complex *in, *out;

fftwf_plan p;

fftwf_malloc(...);

fftwf_plan_xxx(...);

......

// 只要FFT参数不变,不需再次初始化,反复fftwf_execute即可。

fftwf_execute(p);

// 删除资源

fftwf_destrop(...);

fftwf_free(...);

FFTW简介及使用

原文:http://www.cnblogs.com/byeyear/p/5592264.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!