diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2023-03-21 16:14:16 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2023-05-08 15:58:05 +0200 |
commit | 130c2f3c3acd0963aeab64b77bd6b578e698a2f6 (patch) | |
tree | c453371e275c13a093dfe21d86e96d914044e5ec /libgomp/libgomp-plugin.c | |
parent | bd6dbdb196da5aa5c7354e0fc7b0a146237bcf8a (diff) | |
download | gcc-130c2f3c3acd0963aeab64b77bd6b578e698a2f6.zip gcc-130c2f3c3acd0963aeab64b77bd6b578e698a2f6.tar.gz gcc-130c2f3c3acd0963aeab64b77bd6b578e698a2f6.tar.bz2 |
libgomp: Simplify OpenMP reverse offload host <-> device memory copy implementation
... by using the existing 'goacc_asyncqueue' instead of re-coding parts of it.
Follow-up to commit 131d18e928a3ea1ab2d3bf61aa92d68a8a254609
"libgomp/nvptx: Prepare for reverse-offload callback handling",
and commit ea4b23d9c82d9be3b982c3519fe5e8e9d833a6a8
"libgomp: Handle OpenMP's reverse offloads".
libgomp/
* target.c (gomp_target_rev): Instead of 'dev_to_host_cpy',
'host_to_dev_cpy', 'token', take a single 'goacc_asyncqueue'.
* libgomp.h (gomp_target_rev): Adjust.
* libgomp-plugin.c (GOMP_PLUGIN_target_rev): Adjust.
* libgomp-plugin.h (GOMP_PLUGIN_target_rev): Adjust.
* plugin/plugin-gcn.c (process_reverse_offload): Adjust.
* plugin/plugin-nvptx.c (rev_off_dev_to_host_cpy)
(rev_off_host_to_dev_cpy): Remove.
(GOMP_OFFLOAD_run): Adjust.
Diffstat (limited to 'libgomp/libgomp-plugin.c')
-rw-r--r-- | libgomp/libgomp-plugin.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libgomp/libgomp-plugin.c b/libgomp/libgomp-plugin.c index 27e7c94..d696515 100644 --- a/libgomp/libgomp-plugin.c +++ b/libgomp/libgomp-plugin.c @@ -82,11 +82,8 @@ GOMP_PLUGIN_fatal (const char *msg, ...) void GOMP_PLUGIN_target_rev (uint64_t fn_ptr, uint64_t mapnum, uint64_t devaddrs_ptr, uint64_t sizes_ptr, uint64_t kinds_ptr, int dev_num, - void (*dev_to_host_cpy) (void *, const void *, size_t, - void *), - void (*host_to_dev_cpy) (void *, const void *, size_t, - void *), void *token) + struct goacc_asyncqueue *aq) { gomp_target_rev (fn_ptr, mapnum, devaddrs_ptr, sizes_ptr, kinds_ptr, dev_num, - dev_to_host_cpy, host_to_dev_cpy, token); + aq); } |