aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2017-02-02 14:13:57 +0000
committertschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2017-02-02 14:13:57 +0000
commit65caa53b3e767f1df02673f25f281926d11219a7 (patch)
treefaf0068f952501848e4ff07c39f38134178020b5
parent213d144874f24f78f2545c5f7beac8ccdf2946a1 (diff)
libgomp: Normalize the names of a few functions of the libgomp plugin API
libgomp/ * libgomp-plugin.h (GOMP_OFFLOAD_openacc_parallel): Rename to GOMP_OFFLOAD_openacc_exec. Adjust all users. (GOMP_OFFLOAD_openacc_get_current_cuda_device): Rename to GOMP_OFFLOAD_openacc_cuda_get_current_device. Adjust all users. (GOMP_OFFLOAD_openacc_get_current_cuda_context): Rename to GOMP_OFFLOAD_openacc_cuda_get_current_context. Adjust all users. (GOMP_OFFLOAD_openacc_get_cuda_stream): Rename to GOMP_OFFLOAD_openacc_cuda_get_stream. Adjust all users. (GOMP_OFFLOAD_openacc_set_cuda_stream): Rename to GOMP_OFFLOAD_openacc_cuda_set_stream. Adjust all users. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245125 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libgomp/ChangeLog13
-rw-r--r--libgomp/libgomp-plugin.h12
-rw-r--r--libgomp/libgomp.h10
-rw-r--r--libgomp/plugin/plugin-nvptx.c14
-rw-r--r--libgomp/target.c10
5 files changed, 36 insertions, 23 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 829a30f672e..5f05cdb9b46 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,16 @@
+2017-02-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ * libgomp-plugin.h (GOMP_OFFLOAD_openacc_parallel): Rename to
+ GOMP_OFFLOAD_openacc_exec. Adjust all users.
+ (GOMP_OFFLOAD_openacc_get_current_cuda_device): Rename to
+ GOMP_OFFLOAD_openacc_cuda_get_current_device. Adjust all users.
+ (GOMP_OFFLOAD_openacc_get_current_cuda_context): Rename to
+ GOMP_OFFLOAD_openacc_cuda_get_current_context. Adjust all users.
+ (GOMP_OFFLOAD_openacc_get_cuda_stream): Rename to
+ GOMP_OFFLOAD_openacc_cuda_get_stream. Adjust all users.
+ (GOMP_OFFLOAD_openacc_set_cuda_stream): Rename to
+ GOMP_OFFLOAD_openacc_cuda_set_stream. Adjust all users.
+
2017-01-31 Thomas Schwinge <thomas@codesourcery.com>
* libgomp-plugin.h: #include <stdbool.h>.
diff --git a/libgomp/libgomp-plugin.h b/libgomp/libgomp-plugin.h
index fba45ee1754..ff81350ccc7 100644
--- a/libgomp/libgomp-plugin.h
+++ b/libgomp/libgomp-plugin.h
@@ -93,8 +93,8 @@ extern bool GOMP_OFFLOAD_dev2dev (int, void *, const void *, size_t);
extern bool GOMP_OFFLOAD_can_run (void *);
extern void GOMP_OFFLOAD_run (int, void *, void *, void **);
extern void GOMP_OFFLOAD_async_run (int, void *, void *, void **, void *);
-extern void GOMP_OFFLOAD_openacc_parallel (void (*) (void *), size_t, void **,
- void **, int, unsigned *, void *);
+extern void GOMP_OFFLOAD_openacc_exec (void (*) (void *), size_t, void **,
+ void **, int, unsigned *, void *);
extern void GOMP_OFFLOAD_openacc_register_async_cleanup (void *, int);
extern int GOMP_OFFLOAD_openacc_async_test (int);
extern int GOMP_OFFLOAD_openacc_async_test_all (void);
@@ -105,10 +105,10 @@ extern void GOMP_OFFLOAD_openacc_async_wait_all_async (int);
extern void GOMP_OFFLOAD_openacc_async_set_async (int);
extern void *GOMP_OFFLOAD_openacc_create_thread_data (int);
extern void GOMP_OFFLOAD_openacc_destroy_thread_data (void *);
-extern void *GOMP_OFFLOAD_openacc_get_current_cuda_device (void);
-extern void *GOMP_OFFLOAD_openacc_get_current_cuda_context (void);
-extern void *GOMP_OFFLOAD_openacc_get_cuda_stream (int);
-extern int GOMP_OFFLOAD_openacc_set_cuda_stream (int, void *);
+extern void *GOMP_OFFLOAD_openacc_cuda_get_current_device (void);
+extern void *GOMP_OFFLOAD_openacc_cuda_get_current_context (void);
+extern void *GOMP_OFFLOAD_openacc_cuda_get_stream (int);
+extern int GOMP_OFFLOAD_openacc_cuda_set_stream (int, void *);
#ifdef __cplusplus
}
diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
index 6dfe9aadb0d..1769a489fe8 100644
--- a/libgomp/libgomp.h
+++ b/libgomp/libgomp.h
@@ -882,7 +882,7 @@ typedef struct acc_dispatch_t
struct target_mem_desc *data_environ;
/* Execute. */
- __typeof (GOMP_OFFLOAD_openacc_parallel) *exec_func;
+ __typeof (GOMP_OFFLOAD_openacc_exec) *exec_func;
/* Async cleanup callback registration. */
__typeof (GOMP_OFFLOAD_openacc_register_async_cleanup)
@@ -905,12 +905,12 @@ typedef struct acc_dispatch_t
/* NVIDIA target specific routines. */
struct {
- __typeof (GOMP_OFFLOAD_openacc_get_current_cuda_device)
+ __typeof (GOMP_OFFLOAD_openacc_cuda_get_current_device)
*get_current_device_func;
- __typeof (GOMP_OFFLOAD_openacc_get_current_cuda_context)
+ __typeof (GOMP_OFFLOAD_openacc_cuda_get_current_context)
*get_current_context_func;
- __typeof (GOMP_OFFLOAD_openacc_get_cuda_stream) *get_stream_func;
- __typeof (GOMP_OFFLOAD_openacc_set_cuda_stream) *set_stream_func;
+ __typeof (GOMP_OFFLOAD_openacc_cuda_get_stream) *get_stream_func;
+ __typeof (GOMP_OFFLOAD_openacc_cuda_set_stream) *set_stream_func;
} cuda;
} acc_dispatch_t;
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index 4144218ae8f..0284c7ff604 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -1922,9 +1922,9 @@ GOMP_OFFLOAD_dev2dev (int ord, void *dst, const void *src, size_t n)
void (*device_run) (int n, void *fn_ptr, void *vars) = NULL;
void
-GOMP_OFFLOAD_openacc_parallel (void (*fn) (void *), size_t mapnum,
- void **hostaddrs, void **devaddrs,
- int async, unsigned *dims, void *targ_mem_desc)
+GOMP_OFFLOAD_openacc_exec (void (*fn) (void *), size_t mapnum,
+ void **hostaddrs, void **devaddrs,
+ int async, unsigned *dims, void *targ_mem_desc)
{
nvptx_exec (fn, mapnum, hostaddrs, devaddrs, async, dims, targ_mem_desc);
}
@@ -2014,13 +2014,13 @@ GOMP_OFFLOAD_openacc_destroy_thread_data (void *data)
}
void *
-GOMP_OFFLOAD_openacc_get_current_cuda_device (void)
+GOMP_OFFLOAD_openacc_cuda_get_current_device (void)
{
return nvptx_get_current_cuda_device ();
}
void *
-GOMP_OFFLOAD_openacc_get_current_cuda_context (void)
+GOMP_OFFLOAD_openacc_cuda_get_current_context (void)
{
return nvptx_get_current_cuda_context ();
}
@@ -2028,7 +2028,7 @@ GOMP_OFFLOAD_openacc_get_current_cuda_context (void)
/* NOTE: This returns a CUstream, not a ptx_stream pointer. */
void *
-GOMP_OFFLOAD_openacc_get_cuda_stream (int async)
+GOMP_OFFLOAD_openacc_cuda_get_stream (int async)
{
return nvptx_get_cuda_stream (async);
}
@@ -2036,7 +2036,7 @@ GOMP_OFFLOAD_openacc_get_cuda_stream (int async)
/* NOTE: This takes a CUstream, not a ptx_stream pointer. */
int
-GOMP_OFFLOAD_openacc_set_cuda_stream (int async, void *stream)
+GOMP_OFFLOAD_openacc_cuda_set_stream (int async, void *stream)
{
return nvptx_set_cuda_stream (async, stream);
}
diff --git a/libgomp/target.c b/libgomp/target.c
index 26d5abaa499..3dd119f52e5 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -2399,7 +2399,7 @@ gomp_load_plugin_for_device (struct gomp_device_descr *device,
}
if (device->capabilities & GOMP_OFFLOAD_CAP_OPENACC_200)
{
- if (!DLSYM_OPT (openacc.exec, openacc_parallel)
+ if (!DLSYM_OPT (openacc.exec, openacc_exec)
|| !DLSYM_OPT (openacc.register_async_cleanup,
openacc_register_async_cleanup)
|| !DLSYM_OPT (openacc.async_test, openacc_async_test)
@@ -2423,11 +2423,11 @@ gomp_load_plugin_for_device (struct gomp_device_descr *device,
unsigned cuda = 0;
cuda += DLSYM_OPT (openacc.cuda.get_current_device,
- openacc_get_current_cuda_device);
+ openacc_cuda_get_current_device);
cuda += DLSYM_OPT (openacc.cuda.get_current_context,
- openacc_get_current_cuda_context);
- cuda += DLSYM_OPT (openacc.cuda.get_stream, openacc_get_cuda_stream);
- cuda += DLSYM_OPT (openacc.cuda.set_stream, openacc_set_cuda_stream);
+ openacc_cuda_get_current_context);
+ cuda += DLSYM_OPT (openacc.cuda.get_stream, openacc_cuda_get_stream);
+ cuda += DLSYM_OPT (openacc.cuda.set_stream, openacc_cuda_set_stream);
if (cuda && cuda != 4)
{
/* Make sure all the CUDA functions are there if any of them are. */