diff options
Diffstat (limited to 'libgomp/oacc-mem.c')
-rw-r--r-- | libgomp/oacc-mem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libgomp/oacc-mem.c b/libgomp/oacc-mem.c index f6cc373..ce1905c 100644 --- a/libgomp/oacc-mem.c +++ b/libgomp/oacc-mem.c @@ -509,7 +509,8 @@ delete_copyout (unsigned f, void *h, size_t s) gomp_fatal ("[%p,%d] is not mapped", (void *)h, (int)s); } - d = (void *) (n->tgt->tgt_start + n->tgt_offset); + d = (void *) (n->tgt->tgt_start + n->tgt_offset + + (uintptr_t) h - n->host_start); host_size = n->host_end - n->host_start; @@ -562,7 +563,8 @@ update_dev_host (int is_dev, void *h, size_t s) gomp_fatal ("[%p,%d] is not mapped", h, (int)s); } - d = (void *) (n->tgt->tgt_start + n->tgt_offset); + d = (void *) (n->tgt->tgt_start + n->tgt_offset + + (uintptr_t) h - n->host_start); gomp_mutex_unlock (&acc_dev->lock); |