Skip to content

Commit

Permalink
Update argument order in hpx::parallel::transform_reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
ddemidov committed Jan 1, 2015
1 parent 7ce3f64 commit e5f6dd1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions amgcl/backend/hpx.hpp
Expand Up @@ -688,8 +688,7 @@ struct inner_product_impl<
auto range = boost::irange(0, x.nseg);
return hpx::parallel::transform_reduce(
hpx::parallel::par,
boost::begin(range), boost::end(range), static_cast<real>(0),
std::plus<real>(),
boost::begin(range), boost::end(range),
[&x, &y, xptr, yptr](ptrdiff_t seg) {
ptrdiff_t beg = seg * x.grain_size;
ptrdiff_t end = std::min<ptrdiff_t>(beg + x.grain_size, x.size());
Expand All @@ -699,7 +698,9 @@ struct inner_product_impl<
x.safe_to_read[seg],
y.safe_to_read[seg]
).get();
});
},
static_cast<real>(0), std::plus<real>()
);
}
};

Expand Down

0 comments on commit e5f6dd1

Please sign in to comment.