aboutsummaryrefslogtreecommitdiff
path: root/liboffloadmic/plugin
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@gcc.gnu.org>2015-07-17 14:07:53 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2015-07-17 14:07:53 +0000
commitafb2d80bc57bddd52bb04869861bf40503a3e89d (patch)
tree3a591547ebc3f82173daf445721700e8d3d79d4d /liboffloadmic/plugin
parent996d027a36c646fbb0098e96c83dbb4c0ea5133d (diff)
downloadgcc-afb2d80bc57bddd52bb04869861bf40503a3e89d.zip
gcc-afb2d80bc57bddd52bb04869861bf40503a3e89d.tar.gz
gcc-afb2d80bc57bddd52bb04869861bf40503a3e89d.tar.bz2
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/plugin')
-rw-r--r--liboffloadmic/plugin/libgomp-plugin-intelmic.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp b/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp
index a2d61b1..a6e5e1c 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);