MCPcopy Create free account
hub / github.com/bshoshany/thread-pool / min_element_index

Function min_element_index

tests/BS_thread_pool_test.cpp:3150–3153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3148 */
3149template <typename T>
3150std::size_t min_element_index(const std::vector<T>& vec)
3151{
3152 return static_cast<std::size_t>(std::distance(vec.begin(), std::min_element(vec.begin(), vec.end())));
3153}
3154
3155/**
3156 * @brief Calculate and print the speedup obtained by multithreading.

Callers 1

print_speedupFunction · 0.85

Calls 1

endMethod · 0.80

Tested by

no test coverage detected