helper_tools: further mkMapR functions

This commit is contained in:
Christian Zimmermann 2021-01-08 21:40:20 +01:00
parent e7fd650922
commit b4912dba71
2 changed files with 26 additions and 0 deletions

View file

@ -138,6 +138,20 @@ namespace MultiArrayTools
return mkGenMapRwith<SpaceType::ANY>(outr, f, ranges... );
}
template <class Func, class... Indices>
auto mkMapR(const std::shared_ptr<Func>& func, const std::shared_ptr<Indices>&... is)
-> decltype( mkMapR( mkMapOp( func, is... ), is->range()... ) )
{
return mkMapR( mkMapOp( func, is... ), is->range()... );
}
template <class TarRange, class Func, class... Indices>
auto mkMapRwith(const std::shared_ptr<MapORType<Func,SpaceType::ANY>>& outr, const std::shared_ptr<Func>& func, const std::shared_ptr<Indices>&... is)
-> decltype( mkMapRwith(outr, mkMapOp( func, is... ), is->range()... ) )
{
return mkMapRwith(outr, mkMapOp( func, is... ), is->range()... );
}
template <class Op, class MA, class... IndexTypes>
auto mkMapI(const std::tuple<Op,MA>& f, std::shared_ptr<IndexTypes>... indices)
-> decltype( mkGenMapI<SpaceType::ANY>(f, indices... ) )

View file

@ -48,6 +48,18 @@ namespace MultiArrayTools
auto mkMapR(const std::tuple<Op,MA>& f, std::shared_ptr<RangeTypes>... ranges)
-> decltype( mkGenMapR<SpaceType::ANY>(f, ranges... ) );
template <class Op, class MA, class... RangeTypes>
auto mkMapRwith(const std::shared_ptr<MapORType<Op,SpaceType::ANY>>& outr, const std::tuple<Op,MA>& f, std::shared_ptr<RangeTypes>... ranges)
-> decltype( mkGenMapRwith<SpaceType::ANY>(outr, f, ranges... ) );
template <class Func, class... Indices>
auto mkMapR(const std::shared_ptr<Func>& func, const std::shared_ptr<Indices>&... is)
-> decltype( mkMapR( mkMapOp( func, is... ), is->range()... ) );
template <class TarRange, class Func, class... Indices>
auto mkMapRwith(const std::shared_ptr<MapORType<Func,SpaceType::ANY>>& outr, const std::shared_ptr<Func>& func, const std::shared_ptr<Indices>&... is)
-> decltype( mkMapRwith(outr, mkMapOp( func, is... ), is->range()... ) );
template <class Op, class MA, class... RangeTypes>
auto mkMapRwith(const std::shared_ptr<MapORType<Op,SpaceType::ANY>>& outr, const std::tuple<Op,MA>& f,
std::shared_ptr<RangeTypes>... ranges)