[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Galois-list] compiling galois with libc++

From: Gerardo Ballabio
Subject: Re: [Galois-list] compiling galois with libc++
Date: Mon, 15 May 2017 10:15:35 +0200

Hello Marc,
thanks for your report. I'll try to have a look at it this evening.
The code worked for me using g++ (the versions in Debian stable, both wheezy and jessie), but if it isn't standard compliant I'll fix it.
Do you like the game?


2017-05-14 17:05 GMT+02:00 Marc Espie <address@hidden>:
I've had an interesting error message in grid.h, this code specifically:

      for (int i=0; i<layers; ++i)
          std::gslice g(d0.x + ncols * (d0.y + nrows * (d0.z + i)),
                        std::valarray<size_t>(len, 2),
                        std::valarray<size_t>(str, 2));
          std::slice s(cols * rows * i, cols * rows, 1);
          mask[g] = m[s];

Looking more closely, it appears libc++ has no assignment
between std::slice_array and std::gslice_array, and it seems
that this is indeed what the standard says.

(logically, by adding an intermediate conversion from std::slice into
std::valarray, the affectation would work, but I don't think the language
actually allows that).

However it appears that the commented out code works for me, both
on gcc4.9 + libstdc++ and clang4.0 + libc++

Otherwise, the fix would probably be to rewrite the std::slice as a second
std::gslice, since affectation will work then.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]