[Openmp-dev] Interoperability with C++ coroutines

yongkee kwon via Openmp-dev openmp-dev at lists.llvm.org
Mon Feb 11 13:55:50 PST 2019


That is an actually good mental model to treat coroutines as control
manipulation such as goto/longjmp. Could you please refer to where OpenMP
specification says about them?

I wrote a few simple code with coroutines in a canonical loop form and
ended up with a segmentation fault somewhere in outlined code. So I was
wondering if there is any plan to incorporate them.

Thanks,
Yongkee

On Mon, Feb 11, 2019 at 11:00 AM Jeff Hammond <jeff.science at gmail.com>
wrote:

> The OpenMP specification does define interoperability with any other
> threading model.  Implementations may provide interoperability of some
> variants, which is derived from the use of OS threads (e.g. POSIX threads)
> as the foundation for OpenMP and other models.
>
> If your use of coroutines is completely distinct from OpenMP, it is
> possible that things will not break, but I can imagine many thinks could go
> wrong if you try to use them together.
>
> One possible way to reason about interoperability is to treat coroutines
> as structure goto and see what the OpenMP specification says about
> goto/longjmp, but this is at best a necessary but insufficient to
> understand the interaction of coroutines and OpenMP.
>
> Jeff
>
> On Sat, Feb 9, 2019 at 12:03 AM yongkee kwon via Openmp-dev <
> openmp-dev at lists.llvm.org> wrote:
>
>> Hi,
>>
>> Is the latest runtime and compiler for OpenMP interoperable with C++
>> coroutine TS? For example, what if I have a coroutine along with
>> work-sharing directives?
>>
>> I remember there was a discussion in OpenMP Interoperability language
>> subcommittee and I'd like to ask about the current status
>> for Interoperability with C++ coroutine TS.
>>
>> Thanks,
>> Yongkee
>> _______________________________________________
>> Openmp-dev mailing list
>> Openmp-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>>
>
>
> --
> Jeff Hammond
> jeff.science at gmail.com
> http://jeffhammond.github.io/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20190211/2a51ec37/attachment.html>


More information about the Openmp-dev mailing list