[Openmp-dev] export __kmp_get_global_thread_id function or the similar

Yonghong Yan via Openmp-dev openmp-dev at lists.llvm.org
Fri May 5 07:19:10 PDT 2017


Jonas,

Got it and thank you. they are what I need.

I am also thinking of having those fun as part of the standard. Will see ...

Yonghong

On Fri, May 5, 2017 at 10:03 AM, Hahnfeld, Jonas <
Hahnfeld at itc.rwth-aachen.de> wrote:

> Hi,
>
>
>
> __kmp_* functions are the internal implementation. The compiler interface
> is prefixed with __kmpc_*. It looks like you are searching for
> __kmpc_global_thread_num() which calls __kmp_entry_gtid() which is a macro
> to __kmp_get_global_thread_id_reg().
>
>
>
> Similarly, there is __kmpc_global_num_threads() next to it in
> src/kmp_csupport.cpp.
>
>
>
> Cheers,
>
> Jonas
>
>
>
> *From:* Openmp-dev [mailto:openmp-dev-bounces at lists.llvm.org] *On Behalf
> Of *Yonghong Yan via Openmp-dev
> *Sent:* Friday, May 5, 2017 3:50 PM
> *To:* openmp-dev <openmp-dev at lists.llvm.org>
> *Subject:* [Openmp-dev] export __kmp_get_global_thread_id function or the
> similar
>
>
>
> I found this function is very useful for tools and other library that
> directly interacts with the runtime. It is not exported. Is there concern
> of exporting this function, with the same or different name?
>
>
>
> The same for something like kmp_get_total_num_threads().
>
>
>
> Thanks
>
> Yonghong
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20170505/22074671/attachment.html>


More information about the Openmp-dev mailing list