Replacing extrordinarily slow pow() function

前端 未结 4 1788
野性不改
野性不改 2020-12-09 03:01

We have a CFD solver and while running a simulation, it was found to run extraordinarily slow on some machines but not others. Using Intel VTune, it was found the following

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 03:13

    Just write your own pow function, put the .o file in a static library archive libmypow.a somewhere in the linker's library path, and pass -lmypow when linking.

提交回复
热议问题