diff options
author | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2017-01-31 15:32:58 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2017-01-31 15:32:58 +0100 |
commit | dced339c8a6fa30f90181da525fb0da4801bdf39 (patch) | |
tree | f36f8b40db8041e76435b0fdb135725c95644f02 /liboffloadmic | |
parent | 5b11971a564ab8a207e0fa416eb9e0424514529e (diff) | |
download | gcc-dced339c8a6fa30f90181da525fb0da4801bdf39.zip gcc-dced339c8a6fa30f90181da525fb0da4801bdf39.tar.gz gcc-dced339c8a6fa30f90181da525fb0da4801bdf39.tar.bz2 |
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.
From-SVN: r245062
Diffstat (limited to 'liboffloadmic')
-rw-r--r-- | liboffloadmic/ChangeLog | 12 | ||||
-rw-r--r-- | liboffloadmic/plugin/libgomp-plugin-intelmic.cpp | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/liboffloadmic/ChangeLog b/liboffloadmic/ChangeLog index 3d8ad67..c9aa32c 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 26d68b4..d1678d0 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); |