问题
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