MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / transform_accumulate

Function transform_accumulate

src/include/migraphx/algorithm.hpp:54–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52/// Similiar to std::accumulate but a projection can be applied to the elements first
53template <class Iterator, class T, class BinaryOp, class UnaryOp>
54T transform_accumulate(Iterator first, Iterator last, T init, BinaryOp binop, UnaryOp unaryop)
55{
56 return std::inner_product(
57 first, last, first, std::move(init), binop, [&](auto&& x, auto&&) { return unaryop(x); });
58}
59
60/// Similiar to std::partial_sum but a projection can be applied to the elements first
61template <class Iterator, class OutputIterator, class BinaryOperation, class UnaryOp>

Callers 13

add_reduce_meanFunction · 0.85
total_instructionsMethod · 0.85
compute_common_lensFunction · 0.85
compute_common_typesFunction · 0.85
lenFunction · 0.85
visible_lenFunction · 0.85
lenMethod · 0.85
elementsMethod · 0.85
common_rankMethod · 0.85
compute_shapeMethod · 0.85
generate_output_termMethod · 0.85
compileMethod · 0.85

Calls 1

inner_productFunction · 0.85

Tested by

no test coverage detected