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

Function adjacent_for_each

src/include/migraphx/algorithm.hpp:165–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163/// Similiar to std::for_each but instead pass adjacent pairs to the function
164template <class Iterator, class F>
165Iterator adjacent_for_each(Iterator first, Iterator last, F f)
166{
167 if(first == last)
168 return last;
169
170 Iterator next = first;
171 ++next;
172
173 for(; next != last; ++next, ++first)
174 f(*first, *next);
175
176 return last;
177}
178
179/// Like std::for_each but can pass in another range like std::transform
180template <class Iterator1, class Iterator2, class F>

Callers 3

swap_closer_axesMethod · 0.85
simplifyMethod · 0.85
collapse_1_dimsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected