Is it possible to use OpenMP library with Android NDK?

假如想象 提交于 2019-12-05 22:21:21

问题


Is it possible to use OpenMP library with Android NDK?

Maybe somebody already tried to compile them together and can provide some hints?

With appearance of dual-core tablets/smartphones I think it would be really nice to use OpenMP capabilities in apps development.

Thank you in advance.


回答1:


For people coming across this question now: OpenMP is supported in the NDK with GCC as of October 2013 (NDK version 9b). See: https://developer.android.com/ndk/downloads/revision_history.html

where they explain to add:

LOCAL_CFLAGS += -fopenmp
LOCAL_LDFLAGS += -fopenmp

to your Android.mk in order to enable OpenMP support.




回答2:


As discussed here, OpenMP ist not supported yet.

A community patch for this is entirely possible, and as mentioned in the discussion it mainly requires modifications to gcc/libgomp.



来源:https://stackoverflow.com/questions/6375028/is-it-possible-to-use-openmp-library-with-android-ndk

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