Intermediate Code as a result of OpenMP pragmas

2020-07-20 05:12发布

问题:

Is there a way to get my hands on the intermediate source code produced by the OpenMP pragmas? I would like to see how each kind of pragmas is translated.

Cheers.

回答1:

OpenMp pragmas is part of a C / C++ compiler's implementation. Therefore before using it, you need to ensure that your compiler will support the pragmas ! If they are not supported, then they are ignored, so you may get no errors at compilation, but multi-thread wont work. In any case, as mentioned above, since they are part of the compiler's implementation, the best intermediate result that you can get is a lower level code. OpenMp is language extension + libraries, macros etc opposed to Pthreads that arms you purely with libraries !