forked from kokkos/kokkos
-
Notifications
You must be signed in to change notification settings - Fork 0
Kokkos::Timer
Duane Labreche edited this page Jul 27, 2018
·
2 revisions
Header File: Kokkos_Core.hpp
Usage:
Kokkos::Timer timer;
double time = timer.seconds();
timer.reset();
Timer is a simple construct to measure time.
class Timer {
typedef Timer execution_policy;
//Constructors
Timer();
Timer(Timer&&) = default;
Timer(const Timer&) = default;
~Timer() = default;
//Member functions
double seconds();
void reset();
};
-
Timer()
: Default Constructor. Sets the start time. -
void reset()
: Resets the start time. -
double seconds()
: Returns the number of seconds since last call toreset()
or construction.
Timer timer;
// ...
double time1 = timer.seconds();
timer.reset();
// ...
double time2 = timer.seconds();
Home:
- Introduction
- Machine Model
- Programming Model
- Compiling
- Initialization
- View
- Parallel Dispatch
- Hierarchical Parallelism
- Custom Reductions
- Atomic Operations
- Subviews
- Interoperability
- Kokkos and Virtual Functions
- Initialization and Finalization
- View
- Data Parallelism
- Execution Policies
- Spaces
- Task Parallelism
- Utilities
- STL Compatibility
- Numerics
- Detection Idiom