diff options
author | Julian Brown <julian@codesourcery.com> | 2019-12-20 01:20:27 +0000 |
---|---|---|
committer | Julian Brown <jules@gcc.gnu.org> | 2019-12-20 01:20:27 +0000 |
commit | 5d5be7bfb56358feed3fd137d4e3994fcf17f543 (patch) | |
tree | 81fe9c37b82fc1954b0968cc392dcf97af1280c0 /libgomp/openacc.h | |
parent | 4d83edf7efa2b4a4a46646640519bc2cd61c351c (diff) | |
download | gcc-5d5be7bfb56358feed3fd137d4e3994fcf17f543.zip gcc-5d5be7bfb56358feed3fd137d4e3994fcf17f543.tar.gz gcc-5d5be7bfb56358feed3fd137d4e3994fcf17f543.tar.bz2 |
OpenACC 2.6 deep copy: attach/detach API routines
libgomp/
* libgomp.h (struct splay_tree_aux): Add attach_count field.
(gomp_attach_pointer, gomp_detach_pointer): Add prototypes.
* libgomp.map (OACC_2.6): New section. Add acc_attach,
acc_attach_async, acc_detach, acc_detach_async, acc_detach_finalize,
acc_detach_finalize_async.
* oacc-mem.c (acc_attach_async, acc_attach, goacc_detach_internal,
acc_detach, acc_detach_async, acc_detach_finalize,
acc_detach_finalize_async): New functions.
* openacc.h (acc_attach, acc_attach_async, acc_detach,
(acc_detach_async, acc_detach_finalize, acc_detach_finalize_async): Add
prototypes.
* target.c (gomp_attach_pointer, gomp_detach_pointer): New functions.
(gomp_remove_var_internal): Free attachment counts if present.
* testsuite/libgomp.oacc-c-c++-common/deep-copy-3.c: New test.
* testsuite/libgomp.oacc-c-c++-common/deep-copy-5.c: New test.
Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r279624
Diffstat (limited to 'libgomp/openacc.h')
-rw-r--r-- | libgomp/openacc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libgomp/openacc.h b/libgomp/openacc.h index 42c861c..d2e5c10 100644 --- a/libgomp/openacc.h +++ b/libgomp/openacc.h @@ -109,12 +109,18 @@ void *acc_hostptr (void *) __GOACC_NOTHROW; int acc_is_present (void *, size_t) __GOACC_NOTHROW; void acc_memcpy_to_device (void *, void *, size_t) __GOACC_NOTHROW; void acc_memcpy_from_device (void *, void *, size_t) __GOACC_NOTHROW; +void acc_attach (void **) __GOACC_NOTHROW; +void acc_attach_async (void **, int) __GOACC_NOTHROW; +void acc_detach (void **) __GOACC_NOTHROW; +void acc_detach_async (void **, int) __GOACC_NOTHROW; /* Finalize versions of copyout/delete functions, specified in OpenACC 2.5. */ void acc_copyout_finalize (void *, size_t) __GOACC_NOTHROW; void acc_copyout_finalize_async (void *, size_t, int) __GOACC_NOTHROW; void acc_delete_finalize (void *, size_t) __GOACC_NOTHROW; void acc_delete_finalize_async (void *, size_t, int) __GOACC_NOTHROW; +void acc_detach_finalize (void **) __GOACC_NOTHROW; +void acc_detach_finalize_async (void **, int) __GOACC_NOTHROW; /* Async functions, specified in OpenACC 2.5. */ void acc_copyin_async (void *, size_t, int) __GOACC_NOTHROW; |