FFTW使用说明(PPT-24).ppt

  1. 1、本文档共24页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
FFTW使用说明(PPT-24)

3.1 The Planner For a given N, there are many factorizations not clear a priori which is best Eg: 32768 =16x8x8x32=64x16x32 The planner tries them “all” and picks the best one uses actual runtime timing measurements result is encoded in a “plan” Uses dynamic programming to reduce no. of possible plans remembers optimal sub-plans for small sizes The Runtime Planner optimizes FFTW for your CPU, your cache size, etc. Ideas Modern architectures are invalidating conventional wisdom about what is fast no new wisdom is emerging In the name of performance, designers have sacrificed: predictability, repeatability, composability Hand-optimization of programs is becoming impractical 3.2 The Codelet Generator Generates highly-optimized transforms of small sizes form the base cases of the FFT recursion Manipulates abstract syntax tree which is unparsed to C knows about complex arithmetic, etc. The codelets composable blocks of optimized code computer generated Advantages Long, unrolled code takes advantage of: optimizing compilers (instruction scheduling, etc.), large register sets Applies tedious optimizations Easy to experiment with different algorithms prime factor, split-radix (transform sizes not a power of 2) various optimization schemes 3.3 The Executor Executes the plan by composing codelets Explicit recursion divide-and-conquer uses all levels of the memory hierarchy fit in cache Novel storage for the twiddle factors store them in the order they are used 3.4 FFTW is Easy to Use COMPLEX A[n], B[n]; fftw_plan plan; plan = fftw_create_plan(n); /* create the plan */ fftw(plan, A); /* use the plan */ fftw(plan, B); /* re-use the plan */ fftw_destroy_plan(plan) /* destroy the plan*/ 4.1 调用说明 FFTW 的C函数允许Fortran程序调用 . fftw/fftwnd/rfftw/rfftwnd 由 fftw_f77/fftwnd_f77/rfftw_f77/rfftwnd_f77所替代 3. 函数的大多数参数相同, 少数例外: plan变量在C中为fftw_plan, rfftw_plan等类型, Fortran上对64位机器用integer*8 类型 Fortran数组列存储,C为行存储, integer对应于int, real对应于float fortran/fftw_f77.

文档评论(0)

yurixiang1314 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档