diff options
author | Nathan Sidwell <nathan@gcc.gnu.org> | 2015-07-17 14:07:53 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2015-07-17 14:07:53 +0000 |
commit | afb2d80bc57bddd52bb04869861bf40503a3e89d (patch) | |
tree | 3a591547ebc3f82173daf445721700e8d3d79d4d /liboffloadmic | |
parent | 996d027a36c646fbb0098e96c83dbb4c0ea5133d (diff) | |
download | gcc-afb2d80bc57bddd52bb04869861bf40503a3e89d.tar.gz |
mkoffload.c (process): Constify target data.
gcc/
* config/nvptx/mkoffload.c (process): Constify target data.
* config/i386/intelmic-mkoffload.c (generate_target_descr_file):
Constify target data.
(generate_target_offloadend_file): Likewise.
libgomp/
* libgomp.h (gomp_device_descr): Constify target data arguments.
* target.c (struct offload_image_descr): Constify target_data.
(gomp_offload_image_to_device): Likewise.
(GOMP_offload_register): Likewise.
(GOMP_offload_unrefister): Likewise.
* plugin/plugin-host.c (GOMP_OFFLOAD_load_image,
GOMP_OFFLOAD_unload_image): Constify target data.
* plugin/plugin-nvptx.c (struct ptx_image_data): Constify target data.
(GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): Likewise.
liboffloadmic/
* plugin/libgomp-plugin-intelmic.cpp (ImgDevAddrMap): Constify.
(offload_image, GOMP_OFFLOAD_load_image,
OMP_OFFLOAD_unload_image): Constify target data.
From-SVN: r225936
Diffstat (limited to 'liboffloadmic')
-rw-r--r-- | liboffloadmic/ChangeLog | 7 | ||||
-rw-r--r-- | liboffloadmic/plugin/libgomp-plugin-intelmic.cpp | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/liboffloadmic/ChangeLog b/liboffloadmic/ChangeLog index b0f9e90187f..a641dd39db8 100644 --- a/liboffloadmic/ChangeLog +++ b/liboffloadmic/ChangeLog @@ -1,3 +1,10 @@ +2015-07-17 Nathan Sidwell <nathan@acm.org> + Ilya Verbin <iverbin@gmail.com> + + * plugin/libgomp-plugin-intelmic.cpp (ImgDevAddrMap): Constify. + (offload_image, GOMP_OFFLOAD_load_image, + OMP_OFFLOAD_unload_image): Constify target data. + 2015-07-08 Thomas Schwinge <thomas@codesourcery.com> * plugin/Makefile.am (main_target_image.h): Change type of data diff --git a/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp b/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp index a2d61b15783..a6e5e1c7756 100644 --- a/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp +++ b/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp @@ -61,7 +61,7 @@ typedef std::vector<addr_pair> AddrVect; typedef std::vector<AddrVect> DevAddrVect; /* Addresses for all images and all devices. */ -typedef std::map<void *, DevAddrVect> ImgDevAddrMap; +typedef std::map<const void *, DevAddrVect> ImgDevAddrMap; /* Total number of available devices. */ @@ -255,7 +255,7 @@ get_target_table (int device, int &num_funcs, int &num_vars, void **&table) corresponding target addresses. */ static void -offload_image (void *target_image) +offload_image (const void *target_image) { struct TargetImage { int64_t size; @@ -328,7 +328,8 @@ offload_image (void *target_image) } extern "C" int -GOMP_OFFLOAD_load_image (int device, void *target_image, addr_pair **result) +GOMP_OFFLOAD_load_image (int device, const void *target_image, + addr_pair **result) { TRACE ("(device = %d, target_image = %p)", device, target_image); @@ -352,7 +353,7 @@ GOMP_OFFLOAD_load_image (int device, void *target_image, addr_pair **result) } extern "C" void -GOMP_OFFLOAD_unload_image (int device, void *target_image) +GOMP_OFFLOAD_unload_image (int device, const void *target_image) { TRACE ("(device = %d, target_image = %p)", device, target_image); |