aboutsummaryrefslogtreecommitdiff
path: root/libgomp/oacc-host.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2015-08-24 17:10:06 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2015-08-24 17:10:06 +0000
commit2a21ff193a35df1cd72089f5c2a044557abded28 (patch)
tree139836bcec017a86c8257b2582f253251c7abb45 /libgomp/oacc-host.c
parent5cdf54b7654d7245f3f683d352184e6bd353063a (diff)
downloadgcc-2a21ff193a35df1cd72089f5c2a044557abded28.zip
gcc-2a21ff193a35df1cd72089f5c2a044557abded28.tar.gz
gcc-2a21ff193a35df1cd72089f5c2a044557abded28.tar.bz2
libgomp.map: Add 4.0.2 version.
libgomp/ * libgomp.map: Add 4.0.2 version. * target.c (offload_image_descr): Add version field. (gomp_load_image_to_device): Add version argument. Adjust plugin call. Improve load mismatch diagnostic. (gomp_unload_image_from_device): Add version argument. Adjust plugin call. (GOMP_offload_regster): Make stub function, move bulk to ... (GOMP_offload_register_ver): ... here. Process version argument. (GOMP_offload_unregister): Make stub function, move bulk to ... (GOMP_offload_unregister_ver): ... here. Process version argument. (gomp_init_device): Process version field. (gomp_unload_device): Process version field. (gomp_load_plugin_for_device): Reimplement DLSYM & DLSYM_OPT macros. Check plugin version. * libgomp.h (gomp_device_descr): Add version function field. Adjust loader and unloader types. * oacc-host.c: Include gomp-constants.h. (host_version): New. (host_load_image, host_unload_image): Adjust. (host_dispatch): Add host_version. * plugin/plugin-nvptx.c: Include gomp-constants.h. (GOMP_OFFLOAD_version): New. (GOMP_OFFLOAD_load_image): Add version arg and check it. (GOMP_OFFLOAD_unload_image): Likewise. * plugin/plugin-host.c: Include gomp-constants.h. (GOMP_OFFLOAD_version): New. (GOMP_OFFLOAD_load_image): Add version arg. (GOMP_OFFLOAD_unload_image): Likewise. liboffloadmic/ * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_version): New. (GOMP_OFFLOAD_load_image): Add version arg and check it. (GOMP_OFFLOAD_unload_image): Likewise. include/ * gomp-constants.h (GOMP_VERSION, GOMP_VERSION_NVIDIA_PTX, GOMP_VERSION_INTEL_MIC): New. (GOMP_VERSION_PACK, GOMP_VERSION_LIB, GOMP_VERSION_DEV): New. gcc/ * config/nvptx/mkoffload.c (process): Replace GOMP_offload_{,un}register with GOMP_offload_{,un}register_ver. From-SVN: r227137
Diffstat (limited to 'libgomp/oacc-host.c')
-rw-r--r--libgomp/oacc-host.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libgomp/oacc-host.c b/libgomp/oacc-host.c
index 17a5102..55bb16b 100644
--- a/libgomp/oacc-host.c
+++ b/libgomp/oacc-host.c
@@ -28,6 +28,7 @@
#include "libgomp.h"
#include "oacc-int.h"
+#include "gomp-constants.h"
#include <stdbool.h>
#include <stddef.h>
@@ -69,8 +70,15 @@ host_fini_device (int n __attribute__ ((unused)))
{
}
+static unsigned
+host_version (void)
+{
+ return GOMP_VERSION;
+}
+
static int
host_load_image (int n __attribute__ ((unused)),
+ unsigned v __attribute__ ((unused)),
const void *t __attribute__ ((unused)),
struct addr_pair **r __attribute__ ((unused)))
{
@@ -79,6 +87,7 @@ host_load_image (int n __attribute__ ((unused)),
static void
host_unload_image (int n __attribute__ ((unused)),
+ unsigned v __attribute__ ((unused)),
const void *t __attribute__ ((unused)))
{
}
@@ -206,6 +215,7 @@ static struct gomp_device_descr host_dispatch =
.get_num_devices_func = host_get_num_devices,
.init_device_func = host_init_device,
.fini_device_func = host_fini_device,
+ .version_func = host_version,
.load_image_func = host_load_image,
.unload_image_func = host_unload_image,
.alloc_func = host_alloc,