This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: constify target offload data


On 07/17/15 07:05, Jakub Jelinek wrote:
On Fri, Jul 17, 2015 at 02:01:12PM +0300, Ilya Verbin wrote:
On Thu, Jul 16, 2015 at 16:08:47 -0400, Nathan Sidwell wrote:
Jakub, Ilya,
this patch against trunk constifies the offload target data.  I'm
having difficulty building an intelmic toolchain, so the changes
there aren't tested. Ilya, if you could check them, that'd be great.

Works fine with one change:


diff --git a/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp b/liboffloadmic/plugin/libgomp-plugin-intelmic.cpp
index 136fb99..baa4945 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;

  /* Image descriptor needed by __offload_[un]register_image.  */
  struct TargetImageDesc {

The patch is ok for trunk with that change then.

Thanks!

Have  you had a chance to review the host-side const patch?

nathan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]