系统相关
首页 > 系统相关> > c – 针对AT91SAM9 ARM处理器Linux用户空间程序优化FFT和数学

c – 针对AT91SAM9 ARM处理器Linux用户空间程序优化FFT和数学

作者:互联网

我正在使用Atmel的AT91SAM9G20处理器为嵌入式Linux系统开发C/C++软件.我需要使用Linux用户空间程序使用定点(或可能是浮点)数学来快速计算FFT.我理解汇编程序可能是关于实现的方法,并且在使用gcc编译器编译时可能需要额外的-mpcu开关.继续执行此实现的最佳方法是什么,是否有任何好的书籍参考或优化的FOSS库可用?

我必须实现一些算法,这些算法也需要小的FFT长度(即1024点)才能应用多次,我想知道一些库(例如kissfft)是否也能正常工作.我也对长FFT长度感兴趣,因此下面的答案中建议的FFTW也可以很好地工作.

除了这个问题之外,我还想知道如何在ARM9 Linux用户空间程序中处理整数除法.如果我除以两个整数(例如25/4),是否使用软浮点数完成除法?我还需要实现一些重数字运算算法,我想知道定点是否比浮点数学更好用,以及gcc编译器如何真正处理事情.

解决方法:

FFTw包含CPU特定的优化(并且也可以进行编译时/运行时CPU分析).

Version 3.3.1 introduces support for the ARM Neon extensions

> http://www.fftw.org/#features

并从FAQ:问题4.2.为什么FFTW这么快?

This is a complex question, and there is no simple answer. In fact, the authors do not fully know the answer, either. In addition to many small performance hacks throughout FFTW, there are three general reasons for FFTW’s speed.

  • FFTW uses a variety of FFT algorithms and implementation styles that can be arbitrarily composed to adapt itself to a machine. See Q4.1 `How does FFTW work?’.
  • FFTW uses a code generator to produce highly-optimized routines for computing small transforms.
  • FFTW uses explicit divide-and-conquer to take advantage of the memory hierarchy.

标签:c-2,linux,floating-point,arm,fixed-point
来源: https://codeday.me/bug/20190626/1291320.html