diff options
author | Tom de Vries <tom@codesourcery.com> | 2018-05-09 13:52:49 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2018-05-09 13:52:49 +0000 |
commit | edbd038a5f0f903cacb549f09b1d992c4222ca10 (patch) | |
tree | 09f3372550d0a9f29fae94eb1220e3609cca1b1e /libgomp/oacc-async.c | |
parent | 88b1e41c2d9d2e9f5c0ae2d1a09da41d76184280 (diff) | |
download | gcc-edbd038a5f0f903cacb549f09b1d992c4222ca10.zip gcc-edbd038a5f0f903cacb549f09b1d992c4222ca10.tar.gz gcc-edbd038a5f0f903cacb549f09b1d992c4222ca10.tar.bz2 |
[openacc] Factor out async argument utility functions
2018-05-09 Tom de Vries <tom@codesourcery.com>
PR libgomp/83792
* oacc-int.h (async_valid_stream_id_p, async_valid_p)
(async_synchronous_p): New function.
* oacc-async.c (acc_async_test, acc_wait, acc_wait_all_async): Use
async_valid_p.
* oacc-cuda.c (acc_get_cuda_stream, acc_set_cuda_stream): Use
async_valid_stream_id_p.
* oacc-mem.c (gomp_acc_remove_pointer): Use async_synchronous_p.
* oacc-parallel.c (GOACC_parallel_keyed): Same.
From-SVN: r260081
Diffstat (limited to 'libgomp/oacc-async.c')
-rw-r--r-- | libgomp/oacc-async.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgomp/oacc-async.c b/libgomp/oacc-async.c index 7cdb627..a4e1863 100644 --- a/libgomp/oacc-async.c +++ b/libgomp/oacc-async.c @@ -34,7 +34,7 @@ int acc_async_test (int async) { - if (async < acc_async_sync) + if (!async_valid_p (async)) gomp_fatal ("invalid async argument: %d", async); struct goacc_thread *thr = goacc_thread (); @@ -59,7 +59,7 @@ acc_async_test_all (void) void acc_wait (int async) { - if (async < acc_async_sync) + if (!async_valid_p (async)) gomp_fatal ("invalid async argument: %d", async); struct goacc_thread *thr = goacc_thread (); @@ -117,7 +117,7 @@ acc_async_wait_all (void) void acc_wait_all_async (int async) { - if (async < acc_async_sync) + if (!async_valid_p (async)) gomp_fatal ("invalid async argument: %d", async); struct goacc_thread *thr = goacc_thread (); |