Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
Simple tool for performance measuring. More...
Public Member Functions | |
void | tic () |
Start timer. More... | |
void | toc () |
Stop timer. More... | |
double | diff () const |
Return time in seconds elapsed between tic and toc. More... | |
Simple tool for performance measuring.
The implementation of this class is chosen with compile-time MACROS THRUST_DEVICE_SYSTEM
and MPI_VERSION
.
double dg::Timer::diff | ( | ) | const |
Return time in seconds elapsed between tic and toc.
void dg::Timer::tic | ( | ) |
Start timer.
uses omp_get_wtime()
if available, else gettimeofday
. If compiled with nvcc we place cudaEvent_t
in the gpu stream. The mpi version places an MPI_Barrier(MPI_COMM_WORLD)
and then uses MPI_Wtime
. MPI + Cuda adds an additional cudaDeviceSynchronize
void dg::Timer::toc | ( | ) |
Stop timer.
uses omp_get_wtime()
if available, else gettimeofday
. If compiled with nvcc we place cudaEvent_t
in the gpu stream. The mpi version places an MPI_Barrier(MPI_COMM_WORLD)
and then uses MPI_Wtime
. MPI + Cuda adds an additional cudaDeviceSynchronize