Hi! On Wed, 19 Feb 2014 18:59:59 +0100, Jakub Jelinek <ja...@redhat.com> wrote: > On Wed, Feb 19, 2014 at 09:49:20PM +0400, Ilya Verbin wrote: > > 2014-02-19 20:10 GMT+04:00 Thomas Schwinge <tho...@codesourcery.com>: > > > Here is such a libgomp plugin plus the infrastructure for initial support > > > of non-shared memory host execution. Any comments? > > > > This plugin looks good.
Committed to gomp-4_0-branch as r207938. Reviewing old emails, I now see in <http://news.gmane.org/find-root.php?message_id=%3C20130913123614.GB1817%40tucnak.redhat.com%3E> that Jakub suggested to check that »sizeof (void *) == sizeof (uintptr_t), etc.«, and then in <http://news.gmane.org/find-root.php?message_id=%3C20130918090525.GF1817%40tucnak.redhat.com%3E> to use »uintptr_t instead of void *« and different names for the functions: »device_alloc (taking size and align arguments, returning uintptr_t target address), device_free (taking uintptr_t target address and perhaps size), device_copyto (like memcpy, just with target address uintptr_t instead of void *) and device_copyfrom (similarly), and device_run hook or similar (taking host and target fn and target uintptr_t address of the block with pointers)«. So, the code should probably be adjusted for that. > > I think the function call in GOMP_target also should be replaced with > > a call to plugin: > > - fn ((void *) tgt->tgt_start); > > + devicep->device_run_func (fn, (void *) tgt->tgt_start); Yes. > > Also I have a question (not related with this plugin): How will > > libgomp work with multiple devices of the same type? Probably it > > should load the plugin once, query it for the number of available > > devices, add received number of descriptors to the devices[] array, an > > then pass devicep->id as an argument to all plugin's interfaces. > > Or the devicep pointer. To which extent to we want/have to expose non-trivial data types to plugins, such as a devicep pointer as opposed to (void *) tgt->tgt_start? Grüße, Thomas
pgpUaoQXOZTcl.pgp
Description: PGP signature