OpenMP on iOS/Android

本秂侑毒 提交于 2019-12-22 05:33:28

问题


OpenMP is supported in GCC which is cross-platform... but does that mean OpenMP is supported on all target platforms? Specifically, iOS and Android**... as phones/tablets move to quad-core, not using all the cores in games will be a huge disadvantage.

** As a non mobile-developer I don't know if you can write C++ apps for Android in the first place?


回答1:


This is not necessarily the case. Example: http://groups.google.com/group/android-ndk/browse_thread/thread/a547eac5446035b4?pli=1

OMP is not supported on all target GCC platforms. It's certainly not available for Gameboy Advance, e.g., even though GCC can target ARM/Thumb architectures.

On the iOS side, I'm not sure if OMP is supported or not, but Apple would probably strongly encourage the use of their Grand Central Dispatch library with focus on asynchronous task queuing (Apple really pushes that one with the ideal being that applications should never stall and show a loading icon which is quite different from just parallel loops to speed up sequential processing).

As a non mobile-developer I don't know if you can write C++ apps for Android in the first place?

Yes, C and C++ with the Android NDK are the two languages supported for building native Android applications, while iOS focuses on C, C++, and Objective-C.



来源:https://stackoverflow.com/questions/9479434/openmp-on-ios-android

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