R: C++ Optimization flag when using the inline package

前端 未结 2 1346
故里飘歌
故里飘歌 2020-12-09 16:49

In R when using the cxxfunction from the inline package, how does one change the optimization flag for the cpp compiler?

By default, on my machine, it compiles with

2条回答
  •  遥遥无期
    2020-12-09 17:21

    I can suggest a hack. Write a little wrapper program (also called cpp) which calls the real cpp and passes all arguments to it as is except that it passes -O3 for optimization. Then make sure your program occurs first in the executable path resolution for R.

提交回复
热议问题