
算法说明
姓名 邓辉 联系方式 denghui0815@hotmail.com
编译说明:
由于没有 64 位机器,所以使用 32 位编译测试.
希望主办方在测试时能使用 64 位编译.
另外在 ICC 编译的时候请使用 PGO,
开启 Phase 1: Instrumentation Build (/Qprof_gen) 编译.
然后使用测试数据运行程序.
开启 Phase 3: Feedback Build (/Qprof_use)编译.
算法说明:
1. Find smallest positive root Usage: XFindRoot 1 tolerance;
根据 f(0) = -2
f(1) = -2 + 1000 * sin(1)
可知 0-1 之间存在至少一个解。
于是可以通过不断降低步进的方式查找最小正根。
2. Find the number of roots Usage: XFindRoot 2 tolerance
将[1.0,1.5)划分为多个子区间,进行并行寻解。
单由于 X^1000 非常大导致 sin(X^1000)的误差很大。
统计的根的个数并不精确。
优化工具:
使用 ICC, TBB, MKL,Vtune 和 Thread Profiler
函数性能分析: