aboutsummaryrefslogtreecommitdiff
path: root/libgomp/oacc-cuda.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2018-12-14 21:42:08 +0100
committerThomas Schwinge <tschwinge@gcc.gnu.org>2018-12-14 21:42:08 +0100
commit18c247cc0b7b15a0910641e7de29b35f2025a4f8 (patch)
treea4dec1fa6554c8adfc9824efc21dd86ee3905c0a /libgomp/oacc-cuda.c
parent5d390fd3ae4e2de66b4f53efbb657ea01fee5620 (diff)
downloadgcc-18c247cc0b7b15a0910641e7de29b35f2025a4f8.zip
gcc-18c247cc0b7b15a0910641e7de29b35f2025a4f8.tar.gz
gcc-18c247cc0b7b15a0910641e7de29b35f2025a4f8.tar.bz2
[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
Diffstat (limited to 'libgomp/oacc-cuda.c')
-rw-r--r--libgomp/oacc-cuda.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgomp/oacc-cuda.c b/libgomp/oacc-cuda.c
index 20774c1..4ee4c9b 100644
--- a/libgomp/oacc-cuda.c
+++ b/libgomp/oacc-cuda.c
@@ -58,7 +58,7 @@ acc_get_cuda_stream (int async)
{
struct goacc_thread *thr = goacc_thread ();
- if (!async_valid_stream_id_p (async))
+ if (!async_valid_p (async))
return NULL;
if (thr && thr->dev && thr->dev->openacc.cuda.get_stream_func)
@@ -72,7 +72,7 @@ acc_set_cuda_stream (int async, void *stream)
{
struct goacc_thread *thr;
- if (!async_valid_stream_id_p (async) || stream == NULL)
+ if (!async_valid_p (async) || stream == NULL)
return 0;
goacc_lazy_initialize ();