aboutsummaryrefslogtreecommitdiff
path: root/liboffloadmic
diff options
context:
space:
mode:
authortschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-31 14:32:58 +0000
committertschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>2017-01-31 14:32:58 +0000
commit468af399108a74c00c9d16cbe02a780aea1b2987 (patch)
treef36f8b40db8041e76435b0fdb135725c95644f02 /liboffloadmic
parent3dcf62eaf42a3fcb504fc5297554be8a9bf16e9b (diff)
libgomp: Provide prototypes for functions implemented by libgomp plugins
libgomp/ * libgomp-plugin.h: #include <stdbool.h>. (GOMP_OFFLOAD_get_name, GOMP_OFFLOAD_get_caps) (GOMP_OFFLOAD_get_type, GOMP_OFFLOAD_get_num_devices) (GOMP_OFFLOAD_init_device, GOMP_OFFLOAD_fini_device) (GOMP_OFFLOAD_version, GOMP_OFFLOAD_load_image) (GOMP_OFFLOAD_unload_image, GOMP_OFFLOAD_alloc, GOMP_OFFLOAD_free) (GOMP_OFFLOAD_dev2host, GOMP_OFFLOAD_host2dev) (GOMP_OFFLOAD_dev2dev, GOMP_OFFLOAD_can_run, GOMP_OFFLOAD_run) (GOMP_OFFLOAD_async_run, GOMP_OFFLOAD_openacc_parallel) (GOMP_OFFLOAD_openacc_register_async_cleanup) (GOMP_OFFLOAD_openacc_async_test) (GOMP_OFFLOAD_openacc_async_test_all) (GOMP_OFFLOAD_openacc_async_wait) (GOMP_OFFLOAD_openacc_async_wait_async) (GOMP_OFFLOAD_openacc_async_wait_all) (GOMP_OFFLOAD_openacc_async_wait_all_async) (GOMP_OFFLOAD_openacc_async_set_async) (GOMP_OFFLOAD_openacc_create_thread_data) (GOMP_OFFLOAD_openacc_destroy_thread_data) (GOMP_OFFLOAD_openacc_get_current_cuda_device) (GOMP_OFFLOAD_openacc_get_current_cuda_context) (GOMP_OFFLOAD_openacc_get_cuda_stream) (GOMP_OFFLOAD_openacc_set_cuda_stream): New prototypes. * libgomp.h (struct acc_dispatch_t, struct gomp_device_descr): Use these. * plugin/plugin-hsa.c (GOMP_OFFLOAD_load_image) (GOMP_OFFLOAD_unload_image): Fix argument types. liboffloadmic/ * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_get_type): Fix return type. (GOMP_OFFLOAD_load_image): Fix argument types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245062 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'liboffloadmic')
-rw-r--r--liboffloadmic/ChangeLog12
-rw-r--r--liboffloadmic/plugin/libgomp-plugin-intelmic.cpp4
2 files changed, 14 insertions, 2 deletions
diff --git a/liboffloadmic/ChangeLog b/liboffloadmic/ChangeLog
index 3d8ad67d2d4..c9aa32c59a2 100644
--- a/liboffloadmic/ChangeLog
+++ b/liboffloadmic/ChangeLog
@@ -1,3 +1,9 @@
+2017-01-31 Thomas Schwinge <thomas@codesourcery.com>
+
+ * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_get_type): Fix
+ return type.
+ (GOMP_OFFLOAD_load_image): Fix argument types.
+
2017-01-21 Jakub Jelinek <jakub@redhat.com>
PR other/79046
@@ -630,3 +636,9 @@
* runtime/orsl-lite/lib/orsl-lite.c: Ditto.
* runtime/orsl-lite/version.txt: Ditto.
* runtime/use_mpss2.txt: Ditto.
+
+Copyright (C) 2014-2017 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp b/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp
index 26d68b49626..d1678d0514e 100644
--- a/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp
+++ b/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp
@@ -159,7 +159,7 @@ GOMP_OFFLOAD_get_caps (void)
return res;
}
-extern "C" enum offload_target_type
+extern "C" int
GOMP_OFFLOAD_get_type (void)
{
enum offload_target_type res = OFFLOAD_TARGET_TYPE_INTEL_MIC;
@@ -345,7 +345,7 @@ GOMP_OFFLOAD_version (void)
extern "C" int
GOMP_OFFLOAD_load_image (int device, const unsigned version,
- void *target_image, addr_pair **result)
+ const void *target_image, addr_pair **result)
{
TRACE ("(device = %d, target_image = %p)", device, target_image);