Skip to content

Commit 368bc7b

Browse files
authored
Merge pull request #73 from stephenswat/fix/strided_copy_scalar
Allow strided copy to use scalar coordinates
2 parents f7233b0 + 355e0a8 commit 368bc7b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/core/covfie/core/backend/transformer/strided.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ struct strided {
8282

8383
for (std::size_t i = 0; i < covariant_output_t::dimensions; ++i)
8484
{
85-
res[idx][i] = nother.at(t)[i];
85+
if constexpr (covariant_output_t::dimensions == 1 && !std::unsigned_integral<std::decay_t<decltype(t)>>)
86+
{
87+
res[idx][i] = nother.at(t[0])[i];
88+
} else {
89+
res[idx][i] = nother.at(t)[i];
90+
}
8691
}
8792
},
8893
sizes

0 commit comments

Comments
 (0)