1 #if !defined(FLOW_MATH_H)
18 namespace flow {
namespace samples {
namespace math {
49 std::vector<std::unique_ptr<packet<T>>> terms;
53 terms.emplace_back(move(
inpin.
pop()));
57 T sum(terms[0]->data());
60 std::for_each(terms.begin() + 1, terms.end(), [&sum](
const std::unique_ptr<packet<T>>& packet_up_r){
61 sum += packet_up_r->data();
65 std::unique_ptr<packet<T>> sum_up(
new packet<T>(sum));
81 const_adder(
const T& addend,
const std::string& name_r =
"const_adder") :
node(name_r),
transformer<T, T>(name_r, 1, 1), d_addend(addend) {}
90 packet_p->data() += d_addend;