MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / sort_indices

Function sort_indices

arm_compute/core/utils/misc/Utility.h:168–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 */
167template <typename T>
168std::vector<size_t> sort_indices(const std::vector<T> &v)
169{
170 std::vector<size_t> idx(v.size());
171 std::iota(idx.begin(), idx.end(), 0);
172
173 std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) { return v[i1] < v[i2]; });
174
175 return idx;
176}
177
178/** Checks if a string contains a given suffix
179 *

Callers 1

InstrumentsStatsMethod · 0.85

Calls 3

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected