diff options
author | Chung-Lin Tang <cltang@codesourcery.com> | 2016-05-26 13:28:25 +0000 |
---|---|---|
committer | Chung-Lin Tang <cltang@gcc.gnu.org> | 2016-05-26 13:28:25 +0000 |
commit | b4557008c45c0a44ae848c71d31ce4ed6316d043 (patch) | |
tree | 3365daa7be29239a387036e220df6e9b23275aa4 /libgomp/libgomp.h | |
parent | e79136e41af698ccdaec62ed842b4785162dde09 (diff) | |
download | gcc-b4557008c45c0a44ae848c71d31ce4ed6316d043.zip gcc-b4557008c45c0a44ae848c71d31ce4ed6316d043.tar.gz gcc-b4557008c45c0a44ae848c71d31ce4ed6316d043.tar.bz2 |
oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter.
2016-05-26 Chung-Lin Tang <cltang@codesourcery.com>
libgomp/
* oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter.
* oacc-plugin.c (GOMP_PLUGIN_async_unmap_vars): Add 'int async'
parameter, use to set async stream around call to gomp_unmap_vars,
call gomp_unmap_vars() with 'do_copyfrom' set to true.
* plugin/plugin-nvptx.c (struct ptx_event): Add 'int val' field.
(event_gc): Adjust event handling loop, collect PTX_EVT_ASYNC_CLEANUP
events and call GOMP_PLUGIN_async_unmap_vars() for each of them.
(event_add): Add int parameter, initialize 'val' field when
adding new ptx_event struct.
(nvptx_evec): Adjust event_add() call arguments.
(nvptx_host2dev): Likewise.
(nvptx_dev2host): Likewise.
(nvptx_wait_async): Likewise.
(nvptx_wait_all_async): Likewise.
(GOMP_OFFLOAD_openacc_register_async_cleanup): Add async parameter,
pass to event_add() call.
* oacc-host.c (host_openacc_register_async_cleanup): Add 'int async'
parameter.
* oacc-mem.c (gomp_acc_remove_pointer): Adjust async case to
call openacc.register_async_cleanup_func() hook.
* oacc-parallel.c (GOACC_parallel_keyed): Likewise.
* target.c (gomp_copy_from_async): Delete function.
(gomp_map_vars): Remove async_refcount.
(gomp_unmap_vars): Likewise.
(gomp_load_image_to_device): Likewise.
(omp_target_associate_ptr): Likewise.
* libgomp.h (struct splay_tree_key_s): Remove async_refcount.
(acc_dispatch_t.register_async_cleanup_func): Add int parameter.
(gomp_copy_from_async): Remove.
From-SVN: r236772
Diffstat (limited to 'libgomp/libgomp.h')
-rw-r--r-- | libgomp/libgomp.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h index f0c048b..7b2671b 100644 --- a/libgomp/libgomp.h +++ b/libgomp/libgomp.h @@ -835,8 +835,6 @@ struct splay_tree_key_s { uintptr_t tgt_offset; /* Reference count. */ uintptr_t refcount; - /* Asynchronous reference count. */ - uintptr_t async_refcount; /* Pointer to the original mapping of "omp declare target link" object. */ splay_tree_key link_key; }; @@ -872,7 +870,7 @@ typedef struct acc_dispatch_t unsigned *, void *); /* Async cleanup callback registration. */ - void (*register_async_cleanup_func) (void *); + void (*register_async_cleanup_func) (void *, int); /* Asynchronous routines. */ int (*async_test_func) (int); @@ -977,7 +975,6 @@ extern struct target_mem_desc *gomp_map_vars (struct gomp_device_descr *, size_t, void **, void **, size_t *, void *, bool, enum gomp_map_vars_kind); -extern void gomp_copy_from_async (struct target_mem_desc *); extern void gomp_unmap_vars (struct target_mem_desc *, bool); extern void gomp_init_device (struct gomp_device_descr *); extern void gomp_free_memmap (struct splay_tree_s *); |