[Openmp-dev] #pragma directives expansion

Alexander Musman alexander.musman at gmail.com
Wed Sep 17 20:06:34 PDT 2014


You can also have a look at http://openmp.llvm.org/Reference.pdf - it
contains several examples of how different OpenMP directives are expanded.


2014-09-17 22:47 GMT+04:00 daniel tian <xtian2 at uh.edu>:

> 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
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20140918/a2a7beb1/attachment.html>


More information about the Openmp-dev mailing list