minor change

This commit is contained in:
Christian Zimmermann 2022-12-20 00:52:23 +01:00
parent 34c45e3dd9
commit 07242a995e
3 changed files with 1 additions and 15 deletions

View file

@ -469,16 +469,6 @@ namespace CNORXZ
( bs1, e... ); } ); ( bs1, e... ); } );
} }
template <class BT1, class BT2, class... Indices>
decltype(auto) replaceBlockSizes(const BT1& bs1,
const Sptr<IndexInterface<GMIndex<BT2,Indices...>,typename GMIndex<BT2,Indices...>::MetaType>>& gmi)
{
return iter<0,sizeof...(Indices)>
( [&](auto i) { return std::get<i>(gmi->THIS().pack()); },
[&](const auto&... e) { return std::make_shared<GMIndex<BT1,Indices...>>
( bs1, e... ); } );
}
template <class BT1, class... Is1, class BT2, class... Is2> template <class BT1, class... Is1, class BT2, class... Is2>
decltype(auto) operator*(const Sptr<GMIndex<BT1,Is1...>>& a, const Sptr<GMIndex<BT2,Is2...>>& b) decltype(auto) operator*(const Sptr<GMIndex<BT1,Is1...>>& a, const Sptr<GMIndex<BT2,Is2...>>& b)
{ {

View file

@ -112,10 +112,6 @@ namespace CNORXZ
template <class BT1, class BT2, class... Indices> template <class BT1, class BT2, class... Indices>
decltype(auto) replaceBlockSizes(const BT1& bs1, const Sptr<GMIndex<BT2,Indices...>>& gmi); decltype(auto) replaceBlockSizes(const BT1& bs1, const Sptr<GMIndex<BT2,Indices...>>& gmi);
template <class BT1, class BT2, class... Indices>
decltype(auto) replaceBlockSizes(const BT1& bs1,
const Sptr<IndexInterface<GMIndex<BT2,Indices...>,typename GMIndex<BT2,Indices...>::MetaType>>& gmi);
template <class BT1, class... Is1, class BT2, class... Is2> template <class BT1, class... Is1, class BT2, class... Is2>
decltype(auto) operator*(const Sptr<GMIndex<BT1,Is1...>>& a, const Sptr<GMIndex<BT2,Is2...>>& b); decltype(auto) operator*(const Sptr<GMIndex<BT1,Is1...>>& a, const Sptr<GMIndex<BT2,Is2...>>& b);

View file

@ -177,7 +177,7 @@ namespace CNORXZ
return nullptr; return nullptr;
} }
else { else {
return mkXIndex(replaceBlockSizes(arr, mI)); return mkXIndex(replaceBlockSizes(arr, std::static_pointer_cast<Index>(mI)));
} }
} }
else if constexpr(has_sub<Index>::value) { else if constexpr(has_sub<Index>::value) {