HipTimer Class Reference#
|
Reference API
|
gko::HipTimer Class Reference
#include <ginkgo/core/base/timer.hpp>
Inheritance diagram for gko::HipTimer:
Public Member Functions | |
| void | record (time_point &time) override |
| void | wait (time_point &time) override |
| std::chrono::nanoseconds | difference_async (const time_point &start, const time_point &stop) override |
| HipTimer (std::shared_ptr< const HipExecutor > exec) | |
Public Member Functions inherited from gko::Timer | |
| time_point | create_time_point () |
| std::chrono::nanoseconds | difference (time_point &start, time_point &stop) |
Protected Member Functions | |
| void | init_time_point (time_point &time) override |
Additional Inherited Members | |
Static Public Member Functions inherited from gko::Timer | |
| static std::unique_ptr< Timer > | create_for_executor (std::shared_ptr< const Executor > exec) |
Detailed Description
A timer using events for timing on a HipExecutor.
- Note
- When using a HipExecutor with a custom stream, make sure that the stream's lifetime is longer than the lifetime of this timer.
Member Function Documentation
◆ difference_async()
|
overridevirtual |
Computes the difference between the two time points in nanoseconds. This asynchronous version does not synchronize itself, so the time points need to have been synchronized with, i.e. timer->wait(stop) needs to have been called. The version is intended for more advanced users who want to measure the overhead of timing functionality separately.
- Parameters
-
start the first time point (earlier) end the second time point (later)
- Returns
- the difference between the time points in nanoseconds.
Implements gko::Timer.
◆ init_time_point()
|
overrideprotectedvirtual |
Initializes a new time_point instance for this timer.
Implements gko::Timer.
◆ record()
|
overridevirtual |
Records a time point at the current time.
Implements gko::Timer.
◆ wait()
|
overridevirtual |
Waits until all kernels in-process when recording the time point are finished.
Implements gko::Timer.
The documentation for this class was generated from the following file:
- ginkgo/core/base/timer.hpp
Generated by
Public Member Functions inherited from