Newer
Older
#include <sys/time.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include "JikanDepths.h"
#ifdef INCLUDE_OPEN_MP
#include "omp.h"
#endif
using namespace std;
{
cudaEventRecord ((this->Events)[name].gpu_start);
}
{
cudaEventRecord((this->Events)[name].gpu_end);
cudaEventSynchronize((this->Events)[name].gpu_end);
{
float GPUtime = 0.0;
cudaEventElapsedTime(&GPUtime, (this->Events)[name].gpu_start, (this->Events)[name].gpu_end );
GPUtime *= 1e-3;
(this->Events)[name].elapsed_time += GPUtime;
(this->Events)[name].count ++;
#ifdef SAVE_TIME_SERIES
(this->Events)[name].time_series.push_back(GPUtime);
#endif