1 #ifndef SCALAR_TRANSFORMER_H 2 #define SCALAR_TRANSFORMER_H 13 template <
typename ScalarOp,
typename TransformerSignature,
typename Traits_ = Traits::useDefaults>
15 template <
typename ScalarOp,
typename Out,
typename... In,
typename Traits_>
20 const ScalarOp&
scalarOp()
const {
return static_cast<const ScalarOp&
>( *this ); }
25 inline decltype(
auto ) getScalar(
const Tuple& t,
const Scalar&
s, std::index_sequence<I...> )
const 38 out.reserve( inrange.size() );
39 auto& scalar = scalarOp();
40 for (
const auto&& i : inrange ) {
41 details::insert( out, getScalar( i, scalar, std::index_sequence_for<In...>{} ) );
49 template <
typename ScalarOp,
typename TransformerSignature,
typename Traits_ = Traits::useDefaults>
51 template <
typename ScalarOp,
typename... Out,
typename... In,
typename Traits_>
57 const ScalarOp&
scalarOp()
const {
return static_cast<const ScalarOp&
>( *this ); }
69 inline decltype(
auto ) getScalar(
const Tuple& t,
const Scalar&
s, std::index_sequence<I...> )
const 75 template <
typename InTuple,
typename OutTuple,
std::size_t... I>
76 void insert( InTuple&& in, OutTuple& out, std::index_sequence<I...> )
const 92 reserve( out, inrange.size(), std::index_sequence_for<Out...>{} );
93 auto& scalar = scalarOp();
94 for (
const auto&& i : inrange ) {
95 insert( getScalar( i, scalar, std::index_sequence_for<In...>{} ), out, std::index_sequence_for<Out...>{} );
constexpr struct Gaudi::Functional::details::insert_t insert
constexpr struct Gaudi::Functional::details::deref_t deref
constexpr void applyPostProcessing(const Fun &, Container &, Args...)
struct[[deprecated("use MergingTransformer instead")]] Traits_
decltype(auto) const_range(Args &&...args)
Zips multiple containers together to form a single const range.
Helper functions to set/get the application return code.