diff options
author | Julian Brown <julian@codesourcery.com> | 2019-12-20 01:20:19 +0000 |
---|---|---|
committer | Julian Brown <jules@gcc.gnu.org> | 2019-12-20 01:20:19 +0000 |
commit | 5bcd470bf0749e1f56d05dd43aa9584ff2e3a090 (patch) | |
tree | 0ee2ecab91ac2cde55242703052242660832f5c6 /libgomp/target.c | |
parent | 378da98fcc907d05002bcd3d6ff7951f0cf485e5 (diff) | |
download | gcc-5bcd470bf0749e1f56d05dd43aa9584ff2e3a090.zip gcc-5bcd470bf0749e1f56d05dd43aa9584ff2e3a090.tar.gz gcc-5bcd470bf0749e1f56d05dd43aa9584ff2e3a090.tar.bz2 |
Use gomp_map_val for OpenACC host-to-device address translation
libgomp/
* libgomp.h (gomp_map_val): Add prototype.
* oacc-parallel.c (GOACC_parallel_keyed): Use gomp_map_val instead of
open-coding device-address calculation.
* target.c (gomp_map_val): Make global. Use OFFSET_POINTER in
non-present case.
Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
From-SVN: r279622
Diffstat (limited to 'libgomp/target.c')
-rw-r--r-- | libgomp/target.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgomp/target.c b/libgomp/target.c index f2a6061..ef8e9ab 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -493,7 +493,7 @@ gomp_map_fields_existing (struct target_mem_desc *tgt, (void *) cur_node.host_end); } -static inline uintptr_t +attribute_hidden uintptr_t gomp_map_val (struct target_mem_desc *tgt, void **hostaddrs, size_t i) { if (tgt->list[i].key != NULL) @@ -713,7 +713,7 @@ gomp_map_vars_internal (struct gomp_device_descr *devicep, { /* Not present, hence, skip entry - including its MAP_POINTER, when existing. */ - tgt->list[i].offset = 0; + tgt->list[i].offset = OFFSET_POINTER; if (i + 1 < mapnum && ((typemask & get_kind (short_mapkind, kinds, i + 1)) == GOMP_MAP_POINTER)) |