[Openmp-dev] #pragma directives expansion

daniel tian xtian2 at uh.edu
Wed Sep 17 11:47:04 PDT 2014


The parallel region will be outlined as a function. This function will be
run by each threads. You can take a look at our group's Wikipedia page
regarding the OpenMP implementation in OpenUH.

Also you can take a look at Liao's paper: *OpenUH*: An optimizing, portable
*OpenMP* compiler
<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.190.7005>

On Wed, Sep 17, 2014 at 1:15 PM, Millad Ghane <millad.mg at gmail.com> wrote:

> Hello everyone,
>
> I know that an OpenMP #pragma directive is expanded into some lines of
> codes (or maybe I am wrong). I was hoping if someone could tell me where
> should I look for it?
>
> For example, considering this piece of code:
> #pragma omp parallel
> {
>   printf("Hello world! %d", omp_get_thread_num());
> }
>
> will be converted to something like this:
> f1();
> {
>   printf("Hello world! %d", omp_get_thread_num());
> }
> f2();
>
>
> If I am wrong tell me.And if you know where should I look for in the code,
> let me know about it.
>
>
> Best Regards,
> Millad
>
>
>


-- 
Best Regards,
Xiaonan (Daniel) Tian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20140917/67f33de7/attachment.html>


More information about the Openmp-dev mailing list