diff options
Diffstat (limited to 'libgomp/plugin/plugin-gcn.c')
-rw-r--r-- | libgomp/plugin/plugin-gcn.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c index 4b42a59..f823b27 100644 --- a/libgomp/plugin/plugin-gcn.c +++ b/libgomp/plugin/plugin-gcn.c @@ -2026,11 +2026,12 @@ create_kernel_dispatch (struct kernel_info *kernel, int num_teams, static void process_reverse_offload (uint64_t fn, uint64_t mapnum, uint64_t hostaddrs, - uint64_t sizes, uint64_t kinds, uint64_t dev_num64) + uint64_t sizes, uint64_t kinds, uint64_t dev_num64, + uint64_t signal) { int dev_num = dev_num64; GOMP_PLUGIN_target_rev (fn, mapnum, hostaddrs, sizes, kinds, dev_num, - NULL); + (volatile int *) signal, false); } /* Output any data written to console output from the kernel. It is expected @@ -2080,7 +2081,8 @@ console_output (struct kernel_info *kernel, struct kernargs *kernargs, case 4: process_reverse_offload (data->value_u64[0], data->value_u64[1], data->value_u64[2], data->value_u64[3], - data->value_u64[4], data->value_u64[5]); + data->value_u64[4], data->value_u64[5], + data->value_u64[6]); break; default: printf ("GCN print buffer error!\n"); break; } @@ -5079,7 +5081,8 @@ GOMP_OFFLOAD_openacc_async_queue_callback (struct goacc_asyncqueue *aq, queue_push_callback (aq, fn, data); } -/* Queue up an asynchronous data copy from host to DEVICE. */ +/* Queue up an asynchronous data copy from host to DEVICE. + (Also handles dev2host and dev2dev.) */ bool GOMP_OFFLOAD_openacc_async_host2dev (int device, void *dst, const void *src, @@ -5097,10 +5100,16 @@ bool GOMP_OFFLOAD_openacc_async_dev2host (int device, void *dst, const void *src, size_t n, struct goacc_asyncqueue *aq) { - struct agent_info *agent = get_agent_info (device); - assert (agent == aq->agent); - queue_push_copy (aq, dst, src, n); - return true; + return GOMP_OFFLOAD_openacc_async_host2dev (device, dst, src, n, aq); +} + +/* Queue up an asynchronous data copy from DEVICE to DEVICE. */ + +bool +GOMP_OFFLOAD_openacc_async_dev2dev (int device, void *dst, const void *src, + size_t n, struct goacc_asyncqueue *aq) +{ + return GOMP_OFFLOAD_openacc_async_host2dev (device, dst, src, n, aq); } union goacc_property_value |