Hi! On Tue, 11 Nov 2014 13:53:23 +0000, Julian Brown <jul...@codesourcery.com> wrote: > On Tue, 23 Sep 2014 19:19:31 +0100 > Julian Brown <jul...@codesourcery.com> wrote: > > This patch contains the bulk of the OpenACC 2.0 runtime support, > > building around, or on top of, the OpenMP 4.0 support (as previously > > posted or already extant upstream) where we could. [...] > > Here is a new version of the OpenACC support patch for libgomp, [...]
> --- a/libgomp/libgomp_target.h > +++ b/libgomp/libgomp_target.h > +extern attribute_hidden void > +gomp_free_memmap (struct gomp_device_descr *devicep); > --- a/libgomp/target.c > +++ b/libgomp/target.c > +attribute_hidden void > +gomp_free_memmap (struct gomp_device_descr *devicep) > +{ > + struct gomp_memory_mapping *mm = &devicep->mem_map; > + > + while (mm->splay_tree.root) > + { > + struct target_mem_desc *tgt = mm->splay_tree.root->key.tgt; > + > + splay_tree_remove (&mm->splay_tree, &mm->splay_tree.root->key); > + free (tgt->array); > + free (tgt); > + } > + > + mm->is_initialized = false; > +} Committed to gomp-4_0-branch in r219025: commit 2eb33739d20c07303c42ed56db0fb925b575f33e Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Mon Dec 22 18:04:41 2014 +0000 libgomp: gomp_free_memmap interface change. libgomp/ * libgomp.h (gomp_free_memmap): Take a pointer to a struct gomp_memory_mapping instead of a pointer to a struct gomp_device_descr. Change all users. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@219025 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog.gomp | 4 ++++ libgomp/libgomp.h | 4 ++-- libgomp/oacc-init.c | 2 +- libgomp/target.c | 4 +--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp index 4eac98c..383993d 100644 --- libgomp/ChangeLog.gomp +++ libgomp/ChangeLog.gomp @@ -1,5 +1,9 @@ 2014-12-22 Thomas Schwinge <tho...@codesourcery.com> + * libgomp.h (gomp_free_memmap): Take a pointer to a struct + gomp_memory_mapping instead of a pointer to a struct + gomp_device_descr. Change all users. + * libgomp.h (struct gomp_device_descr): Move target_data member... (struct acc_dispatch_t): ... into here. Change all users. diff --git libgomp/libgomp.h libgomp/libgomp.h index ec3c52e..5897d8f 100644 --- libgomp/libgomp.h +++ libgomp/libgomp.h @@ -790,10 +790,10 @@ extern void gomp_init_device (struct gomp_device_descr *); extern void gomp_init_tables (const struct gomp_device_descr *, struct gomp_memory_mapping *); +extern void gomp_free_memmap (struct gomp_memory_mapping *); + extern void gomp_fini_device (struct gomp_device_descr *); -extern void gomp_free_memmap (struct gomp_device_descr *); - /* work.c */ extern void gomp_init_work_share (struct gomp_work_share *, bool, unsigned); diff --git libgomp/oacc-init.c libgomp/oacc-init.c index 06039b3..3867ca7 100644 --- libgomp/oacc-init.c +++ libgomp/oacc-init.c @@ -350,7 +350,7 @@ acc_shutdown_1 (acc_device_t d) walk->dev->openacc.target_data = target_data = NULL; - gomp_free_memmap (walk->dev); + gomp_free_memmap (&walk->dev->mem_map); walk->dev = NULL; } diff --git libgomp/target.c libgomp/target.c index bf719f8..788d9fb 100644 --- libgomp/target.c +++ libgomp/target.c @@ -722,10 +722,8 @@ gomp_init_dev_tables (struct gomp_device_descr *devicep) attribute_hidden void -gomp_free_memmap (struct gomp_device_descr *devicep) +gomp_free_memmap (struct gomp_memory_mapping *mm) { - struct gomp_memory_mapping *mm = &devicep->mem_map; - while (mm->splay_tree.root) { struct target_mem_desc *tgt = mm->splay_tree.root->key.tgt; Grüße, Thomas
signature.asc
Description: PGP signature