How to compile Eigen in iPhone

谁说胖子不能爱 提交于 2019-12-23 22:24:06

问题


I want to compile Eigen and use it in iPhone with NEON features. How to compile Eigen in iPhone? Do In need to compile for specific ARM chip? And do I need to modify build script?

Cheers.


回答1:


Since explicit vectorization for ARM NEON is supported out of the box in recent versions of Eigen I'm guessing you shouldn't have to do anything special at all. The section on installation in the manual reads:

In order to use Eigen, you just need to download and extract Eigen's source code (see the wiki for download instructions). In fact, the header files in the Eigen subdirectory are the only files required to compile programs using Eigen. The header files are the same for all platforms. It is not necessary to use CMake or install anything.

Summary: it's an all-header library. No compilation needed.

Assuming you have the proper toolchain set up you should be good to go. If you're using one of the supported compilers (gcc, I assume) it should auto-detect which optimizations to compile (edit: assuming the right compiler flags, e.g. NEON turned on).

As for how to compile stuff for iPhone, well, on that topic I'm oblivious :D



来源:https://stackoverflow.com/questions/7453572/how-to-compile-eigen-in-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!