如何OpenMP指令由编译器处理 [英] How is OpenMP directives handled by compiler
问题描述
- 我不知道如何的OpenMP
指令是由编译器处理,
如gcc? -
例如,在此code
- I was wondering how OpenMP directives are handled by compiler, such as gcc?
For example, in this code
int main(int argc, char *argv[])
{
#pragma omp parallel
printf("Hello, world.\n");
return 0;
}
请问GCC的preprocessor通过修改C code
更换的OpenMP指令用
其他一些code?
Does preprocessor of gcc modify the C code by replacing the OpenMP directive with some other code?
什么是code等之后
preprocessing,右为前
组装?
What is the code like after preprocessing and right before being assembled?
感谢和问候!
推荐答案
您可以做一个网络搜索和发现的论文讨论这个话题。我不想给链接,因为它们不断改变,但是在这种情况下,回答你的问题的最简单方法。这里有两个,你可以看看:
You can do a web search and find papers discussing this topic. I hate to give links because they constantly change, but in this case it is the easiest way to answer your question. Here are two that you can look at:
<一个href=\"http://software.intel.com/en-us/blogs/2010/03/04/the-thing-from-another-world-or-how-do-openmp-compilers-work-part-1/\"相对=nofollow>来自另一个世界的事情(或:如何做OpenMP的编译工作第1部分),由迈克尔·克莱姆
希望这会回答你的问题。
Hopefully this will answer your question.
这篇关于如何OpenMP指令由编译器处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!