diff mbox

[libgomp] remove some unneeded args

Message ID 5632BB45.2050800@acm.org
State New
Headers show

Commit Message

Nathan Sidwell Oct. 30, 2015, 12:35 a.m. UTC
The offload execution function doesn't need the sizes and kinds vectors 
describing the offloaded data -- that's already been handled and the vector of 
host and device addresses  is sufficient.

This patch removes those arguments.  As we've already decided that we don't have 
to deal with version skew between libgomp and its plugins, this doesn't require 
versioning changes etc.

Jakub, not sure if this patch falls under your review or not.  Given ptx is the 
only current plugin, and this doesn't break backwards compatibility I figure it ok.

nathan
diff mbox

Patch

2015-10-29  Nathan Sidwell  <nathan@codesourcery.com>

	* libgomp.h (struct acc_dispatch_t): Remove args from exec_func.
	* plugin/plugin-nvptx.c (nvptx_exec): Remove sizes & kinds arg.
	(GOMP_OFFLOAD_openacc_parallel): Likewise.
	* oacc-host.c (host_openacc_exec): Likewise.
	* oacc-parallel.c (GOACC_parallel_keyed): Adjust exec_func call.

Index: libgomp/libgomp.h
===================================================================
--- libgomp/libgomp.h	(revision 229565)
+++ libgomp/libgomp.h	(working copy)
@@ -812,8 +813,8 @@  typedef struct acc_dispatch_t
   struct target_mem_desc *data_environ;
 
   /* Execute.  */
-  void (*exec_func) (void (*) (void *), size_t, void **, void **, size_t *,
-		     unsigned short *, int, unsigned *, void *);
+  void (*exec_func) (void (*) (void *), size_t, void **, void **, int,
+		     unsigned *, void *);
 
   /* Async cleanup callback registration.  */
   void (*register_async_cleanup_func) (void *);
Index: libgomp/plugin/plugin-nvptx.c
===================================================================
--- libgomp/plugin/plugin-nvptx.c	(revision 229565)
+++ libgomp/plugin/plugin-nvptx.c	(working copy)
@@ -877,8 +877,7 @@  event_add (enum ptx_event_type type, CUe
 
 void
 nvptx_exec (void (*fn), size_t mapnum, void **hostaddrs, void **devaddrs,
-	    size_t *sizes, unsigned short *kinds, int async, unsigned *dims,
-	    void *targ_mem_desc)
+	    int async, unsigned *dims, void *targ_mem_desc)
 {
   struct targ_fn_descriptor *targ_fn = (struct targ_fn_descriptor *) fn;
   CUfunction function;
@@ -1653,11 +1652,9 @@  void (*device_run) (int n, void *fn_ptr,
 void
 GOMP_OFFLOAD_openacc_parallel (void (*fn) (void *), size_t mapnum,
 			       void **hostaddrs, void **devaddrs,
-			       size_t *sizes, unsigned short *kinds,
 			       int async, unsigned *dims, void *targ_mem_desc)
 {
-  nvptx_exec (fn, mapnum, hostaddrs, devaddrs, sizes, kinds,
-	      async, dims, targ_mem_desc);
+  nvptx_exec (fn, mapnum, hostaddrs, devaddrs, async, dims, targ_mem_desc);
 }
 
 void
Index: libgomp/oacc-host.c
===================================================================
--- libgomp/oacc-host.c	(revision 229565)
+++ libgomp/oacc-host.c	(working copy)
@@ -135,8 +135,6 @@  host_openacc_exec (void (*fn) (void *),
 		   size_t mapnum __attribute__ ((unused)),
 		   void **hostaddrs,
 		   void **devaddrs __attribute__ ((unused)),
-		   size_t *sizes __attribute__ ((unused)),
-		   unsigned short *kinds __attribute__ ((unused)),
 		   int async __attribute__ ((unused)),
 		   unsigned *dims __attribute ((unused)),
 		   void *targ_mem_desc __attribute__ ((unused)))
Index: libgomp/oacc-parallel.c
===================================================================
--- libgomp/oacc-parallel.c	(revision 229565)
+++ libgomp/oacc-parallel.c	(working copy)
@@ -175,8 +175,8 @@  GOACC_parallel_keyed (int device, void (
     devaddrs[i] = (void *) (tgt->list[i].key->tgt->tgt_start
 			    + tgt->list[i].key->tgt_offset);
 
-  acc_dev->openacc.exec_func (tgt_fn, mapnum, hostaddrs, devaddrs, sizes,
-			      kinds, async, dims, tgt);
+  acc_dev->openacc.exec_func (tgt_fn, mapnum, hostaddrs, devaddrs,
+			      async, dims, tgt);
 
   /* If running synchronously, unmap immediately.  */
   if (async < acc_async_noval)