diff options
Diffstat (limited to 'src/lib/pubkey/xmss/xmss_tools.h')
-rw-r--r-- | src/lib/pubkey/xmss/xmss_tools.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/lib/pubkey/xmss/xmss_tools.h b/src/lib/pubkey/xmss/xmss_tools.h index 65c4a83a7..bbd31fd9f 100644 --- a/src/lib/pubkey/xmss/xmss_tools.h +++ b/src/lib/pubkey/xmss/xmss_tools.h @@ -13,12 +13,6 @@ #include <iterator> #include <type_traits> -#if defined(BOTAN_TARGET_OS_HAS_THREADS) - #include <thread> - #include <chrono> - #include <botan/xmss_hash.h> -#endif - namespace Botan { /** @@ -59,44 +53,8 @@ class XMSS_Tools final void>::type> static void concat(secure_vector<uint8_t>& target, const T& src, size_t len); - /** - * Not a public API function - will be removed in a future release. - * - * Determines the maximum number of threads to be used - * efficiently, based on runtime timining measurements. Ideally the - * result will correspond to the physical number of cores. On systems - * supporting simultaneous multi threading (SMT) - * std::thread::hardware_concurrency() usually reports a supported - * number of threads which is bigger (typically by a factor of 2) than - * the number of physical cores available. Using more threads than - * physically available cores for computationally intesive tasks - * resulted in slowdowns compared to using a number of threads equal to - * the number of physical cores on test systems. This function is a - * temporary workaround to prevent performance degradation due to - * overstressing the CPU with too many threads. - * - * @return Presumed number of physical cores based on timing measurements. - **/ - static size_t max_threads(); // TODO: Remove max_threads() and use - // Botan::CPUID once proper plattform - // independent detection of physical cores is - // available. - private: XMSS_Tools(); - /** - * Measures the time t1 it takes to calculate hashes using - * std::thread::hardware_concurrency() many threads and the time t2 - * calculating the same number of hashes using - * std::thread::hardware_concurrency() / 2 threads. - * - * @return std::thread::hardware_concurrency() if t1 < t2 - * std::thread::hardware_concurrency() / 2 otherwise. - **/ - static size_t bench_threads(); // TODO: Remove bench_threads() and use - // Botan::CPUID once proper plattform - // independent detection of physical cores - // is //available. }; template <typename T, typename U> |