galois-list
[Top][All Lists]
Advanced

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

[Galois-list] compiling galois with libc++


From: Marc Espie
Subject: [Galois-list] compiling galois with libc++
Date: Sun, 14 May 2017 17:05:22 +0200
User-agent: Mutt/1.5.22 (2013-10-16)

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]