mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-05-13 17:55:39 +00:00
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user