yuanming-hu / spgrid_topo_opt

Narrow-Band Topology Optimization on a Sparsely Populated Grid, ACM Transactions on Graphics (SIGGRAPH Asia 2018)
185 stars 37 forks source link

non-type template argument evaluates to -1, which cannot be narrowed to type 'uint64_t' #16

Closed nilparent closed 2 years ago

nilparent commented 2 years ago

Hello, I'm on Ubuntu 20.04.1 LTS. ICC and MKL are from Intel new OneAPI I compiled taichi-legacy with clang-8, everything went well. I struggle with the "ti build" of the spgrid solver. I have the following error :

/home/nilparent/taichi-legacy/projects/spgrid_topo_opt-master/external/SPGrid/Core/SPGrid_Mask.h:140:47: error: non-type template argument evaluates to -1, which cannot be narrowed to type 'uint64_t' (aka 'unsigned long') [-Wc++11-narrowing] static const uint64_t value = BitSpread<i,xmask>::value | BitSpread<j,ymask>::value | BitSpread<k,zmask>::value; And same for line 399. Is there a problem with my icc? Thank you, Nil

nilparent commented 2 years ago

I tried replacing template<int di, int dj, int dk> by template<uint64_t di, uint64_t dj, uint64_t dk> and so with other errors, but it didn't work. I also tried to add a flad : -Wno-narrowing, but it doesn't work. I did the same on ubuntu 18.04, but still the same problem...

any ideas?