[PR88370] acc_get_cuda_stream/acc_set_cuda_stream: acc_async_sync, acc_async_noval
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 14 Dec 2018 20:42:08 +0000 (21:42 +0100)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Fri, 14 Dec 2018 20:42:08 +0000 (21:42 +0100)
commit18c247cc0b7b15a0910641e7de29b35f2025a4f8
treea4dec1fa6554c8adfc9824efc21dd86ee3905c0a
parent5d390fd3ae4e2de66b4f53efbb657ea01fee5620
[PR88370] acc_get_cuda_stream/acc_set_cuda_stream: acc_async_sync, acc_async_noval

Per my reading of the OpenACC specification (and as supported by secondary
documentation, such as code examples, or presentations), it's valid to call
"acc_get_cuda_stream"/"acc_set_cuda_stream" also with "acc_async_sync",
"acc_async_noval" arguments, not just with the nonnegative values as currently
implemented.

libgomp/
PR libgomp/88370
* libgomp.texi (acc_get_current_cuda_context, acc_get_cuda_stream)
(acc_set_cuda_stream): Clarify.
* oacc-cuda.c (acc_get_cuda_stream, acc_set_cuda_stream): Use
"async_valid_p".
* plugin/plugin-nvptx.c (nvptx_set_cuda_stream): Refuse "async ==
acc_async_sync".
* testsuite/libgomp.oacc-c-c++-common/acc_set_cuda_stream-1.c: New file.
* testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-84.c: Update.
* testsuite/libgomp.oacc-c-c++-common/lib-85.c: Likewise.

From-SVN: r267147
libgomp/ChangeLog
libgomp/libgomp.texi
libgomp/oacc-cuda.c
libgomp/plugin/plugin-nvptx.c
libgomp/testsuite/libgomp.oacc-c-c++-common/acc_set_cuda_stream-1.c [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-c-c++-common/async_queue-1.c [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-84.c
libgomp/testsuite/libgomp.oacc-c-c++-common/lib-85.c