Commit 7679649d authored by Martin Reinecke's avatar Martin Reinecke


parent 245a4fc2
Pipeline #80841 passed with stages
in 15 minutes and 7 seconds
......@@ -53,13 +53,13 @@ template<size_t nd1, size_t nd2> shape_t repl_dim(const shape_t &s,
const array<size_t,nd1> &si, const array<size_t,nd2> &so)
MR_assert(s.size()+nd1,"too few input array dimensions");
if constexpr (nd1>1)
if constexpr (nd1>0)
for (size_t i=0; i<nd1; ++i)
MR_assert(si[i]==s[s.size()-nd1+i], "input dimension mismatch");
shape_t snew(s.size()-nd1+nd2);
for (size_t i=0; i<s.size()-nd1; ++i)
if constexpr (nd2>1)
if constexpr (nd2>0)
for (size_t i=0; i<nd2; ++i)
snew[i+s.size()-nd1] = so[i];
return snew;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment