找回密码
 欢迎注册
查看: 8221|回复: 8

[原创] 郭可以参考一下Prime95 version 26的代码

[复制链接]
发表于 2011-12-4 08:34:56 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?欢迎注册

×
February 23, 2011. You may download version 26 now. Much of the FFT assembly code has been rewritten for better speed on newer CPU architectures. There are also many more FFT sizes supported. The net result is significantly faster test times for most users! To upgrade from version 25, simply exit Prime95, download the new version, and unzip the new version replacing the old version.

http://www.mersenne.org/

Software Source Code

If you use GIMPS source code to find Mersenne primes, you must agree to adhere to the GIMPS free software license agreement. Other than that restriction, you may use this code as you see fit.

The source code for the program is highly optimized Intel assembly language. There are many more-readable FFT algorithms available on the web and in textbooks. The program is also completely non-portable. If you are curious anyway, you can download all the source code (33.1MB). This file includes all the version 26.6 source code for Windows, Linux, FreeBSD, and Mac OS X. Last updated: April 8, 2011.

http://www.mersenne.org/freesoft/default.php

这个里面也有大整数乘法除法之类的,希望对你有用!有源代码的
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-12-4 12:57:46 | 显示全部楼层
相当恐怖的汇编代码。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-12-4 20:00:52 | 显示全部楼层
我想我的汇编代码规模也会算是恐怖级的。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-12-5 11:51:28 | 显示全部楼层
哈哈,我看了一下源码,没有想象中的恐怖。
源代码中的汇编文件为Intel格式,使用微软的ml来编译。对于linux平台, 使用
Agner Fog 提供的一个工具objconv 将微软格式的.lib文件转化为Linux格式的.a文件。
总共30个汇编文件,约914KB, 汇编文件源码(包含注释和空行在内)共23000多行。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-12-5 12:11:35 | 显示全部楼层
LS两位。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-12-5 12:17:02 | 显示全部楼层
LS三位,
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-12-5 18:40:18 | 显示全部楼层
没有仔细的看代码,把这套源码看简单了。这套源码中大量使用了MASM中的MACRO,大量的宏被定义在.mac文件中,而在.asm文件调用这些宏。大量的MACRO展开类似于循环展开,减少了比较和跳转语句,指令数却成倍的增加,这样就不难立即为什么源代码的行数并不大,而目标代码(比如gwnum.a,gwnum.lib达到26M多)却很大的原因了。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-12-6 12:15:12 | 显示全部楼层
刚刚搜索了一下关于FFT优化的论文,找到一篇美国特拉华大学的几个教授在2007年发表的题为《Experience of Optimizing FFT on Intel Architectures》的论文,见 http://www.capsl.udel.edu/pub/doc/papers/POHLL2007-Daniel.pdf

其中的3位作者应该是华人,
xiaoming Li, 可能是李晓明,北京大学校长助理、教授、博士生导师
Xueping Li,  可能是美国田纳西州 诺克斯维尔 大学的助理教授,见 http://web.utk.edu/~xli27/
Guang R. Gaom, 早年毕业于清华大学,见他的简历http://www.capsl.udel.edu/~ggao/cv_2011.pdf
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-12-6 13:07:29 | 显示全部楼层
从PAPI的评估测试来看,FFTW各方面都很优秀。从PAPI_BR_CN和PAPI_BR_INS看出,做了更多的展开。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-4-28 00:16 , Processed in 0.049402 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表