Xcode 6 (clang 3.5) 中的 OpenMP 支持
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26159225/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
OpenMP support in Xcode 6 (clang 3.5)
提问by ALoopingIcon
xcode 6 is based on clang 3.5;
on osx 10.9.5 running clang++ --version
from the command line reports
xcode 6 基于 clang 3.5;在 osx 10.9.5 上从命令行运行clang++ --version
报告
Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
so I supposed that Apple included openmp support given the fact that in the clang 3.5 release notes
所以我认为 Apple 包含了 openmp 支持,因为在 clang 3.5 发行说明中
http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html
http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html
the clang developers claim partial openmp support. But it seems that the "-fopenmp" argument is still not recognized.
clang 开发人员声称支持部分 openmp。但似乎“-fopenmp”参数仍未被识别。
Any hints?
任何提示?
回答by Alexey Bataev
Clang still does not fully support OpenMP, actually it supports only Parsing/Sema analysis + some basic coidegen for 'omp parallel' and 'omp simd' directives. You can try to activate it by adding -Xclang -fopenmp=libiomp5 options.
Clang 仍然不完全支持 OpenMP,实际上它只支持 Parsing/Sema 分析 + 'omp parallel' 和 'omp simd' 指令的一些基本代码。您可以尝试通过添加 -Xclang -fopenmp=libiomp5 选项来激活它。