From 92e7c63f9028bb7a260577c7d0ebfbc8007cfcaf Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk <21087696+oleksandr-pavlyk@users.noreply.github.com> Date: Tue, 12 May 2026 14:51:32 -0500 Subject: [PATCH] cpu_timer::start, cpu_timer::stop methods marked noexcept These methods do not throw, and marking them noexcept explicitly makes it fine to call them from other noexcept methods, as such cleanup_noexcept in measure_cold. --- nvbench/cpu_timer.cuh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvbench/cpu_timer.cuh b/nvbench/cpu_timer.cuh index 34565e0..e59ffae 100644 --- a/nvbench/cpu_timer.cuh +++ b/nvbench/cpu_timer.cuh @@ -45,9 +45,9 @@ struct cpu_timer cpu_timer &operator=(const cpu_timer &) = delete; cpu_timer &operator=(cpu_timer &&) = default; - __forceinline__ void start() { m_start = std::chrono::high_resolution_clock::now(); } + __forceinline__ void start() noexcept { m_start = std::chrono::high_resolution_clock::now(); } - __forceinline__ void stop() { m_stop = std::chrono::high_resolution_clock::now(); } + __forceinline__ void stop() noexcept { m_stop = std::chrono::high_resolution_clock::now(); } // In seconds: [[nodiscard]] __forceinline__ nvbench::float64_t get_duration()