aboutsummaryrefslogtreecommitdiff
path: root/libgomp/oacc-mem.c
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2018-05-09 13:52:49 +0000
committerTom de Vries <vries@gcc.gnu.org>2018-05-09 13:52:49 +0000
commitedbd038a5f0f903cacb549f09b1d992c4222ca10 (patch)
tree09f3372550d0a9f29fae94eb1220e3609cca1b1e /libgomp/oacc-mem.c
parent88b1e41c2d9d2e9f5c0ae2d1a09da41d76184280 (diff)
downloadgcc-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-mem.c')
-rw-r--r--libgomp/oacc-mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgomp/oacc-mem.c b/libgomp/oacc-mem.c
index 5cc8fcf..158f086 100644
--- a/libgomp/oacc-mem.c
+++ b/libgomp/oacc-mem.c
@@ -723,7 +723,7 @@ gomp_acc_remove_pointer (void *h, bool force_copyfrom, int async, int mapnum)
gomp_mutex_unlock (&acc_dev->lock);
/* If running synchronously, unmap immediately. */
- if (async < acc_async_noval)
+ if (async_synchronous_p (async))
gomp_unmap_vars (t, true);
else
t->device_descr->openacc.register_async_cleanup_func (t, async);