diff options
author | Tor Egge <Tor.Egge@online.no> | 2021-12-11 15:35:50 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2021-12-11 15:35:50 +0100 |
commit | 75e3be9a94815c4ce4506e2af8568d3abf5f9d5f (patch) | |
tree | 1d7e7cf6b8ab977fdb809da9010266dc48b21127 /vespalib | |
parent | 0848eb7384b5ee31442c5102c60363bc1190804a (diff) |
Use normal function template instead of abbreviated function template.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/tests/wakeup/wakeup_bench.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/vespalib/src/tests/wakeup/wakeup_bench.cpp b/vespalib/src/tests/wakeup/wakeup_bench.cpp index 3661a7c9389..1d9817508d3 100644 --- a/vespalib/src/tests/wakeup/wakeup_bench.cpp +++ b/vespalib/src/tests/wakeup/wakeup_bench.cpp @@ -184,8 +184,10 @@ template <typename T> auto create_list() { return list; } -void destroy_list(auto &list) __attribute__((noinline)); -void destroy_list(auto &list) { +template <typename T> +void destroy_list(T &list) __attribute__((noinline)); +template <typename T> +void destroy_list(T &list) { for (auto *item: list) { item->stop(); item->thread.join(); @@ -193,8 +195,10 @@ void destroy_list(auto &list) { } } -void wait_until_ready(const auto &list) __attribute__((noinline)); -void wait_until_ready(const auto &list) { +template <typename T> +void wait_until_ready(const T &list) __attribute__((noinline)); +template <typename T> +void wait_until_ready(const T &list) { size_t num_ready = 0; do { num_ready = 0; @@ -206,8 +210,10 @@ void wait_until_ready(const auto &list) { } while (num_ready < N); } -auto perform_wakeups(auto &list, size_t target) __attribute__((noinline)); -auto perform_wakeups(auto &list, size_t target) { +template <typename T> +auto perform_wakeups(T &list, size_t target) __attribute__((noinline)); +template <typename T> +auto perform_wakeups(T &list, size_t target) { size_t wake_cnt = 0; size_t skip_cnt = 0; while (wake_cnt < target) { |