Skip to content
Snippets Groups Projects
Commit 12354f5e authored by 数学の武士's avatar 数学の武士
Browse files

cuda upd

parent 2e7ff45e
Branches
Tags
No related merge requests found
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
using namespace std; using namespace std;
#ifdef INCLUDE_GPU_TIMER
void EventData::InitEventsCUDA() void EventData::InitEventsCUDA()
{ {
cudaEventCreate(&(this->gpu_start)); cudaEventCreate(&(this->gpu_start));
...@@ -25,14 +26,4 @@ void EventData::DeinitEventsCUDA() ...@@ -25,14 +26,4 @@ void EventData::DeinitEventsCUDA()
this->ifCUDAinit = false; this->ifCUDAinit = false;
} }
} }
#endif
// void EventData::CUDASyncStart() \ No newline at end of file
// {
// cudaEventRecord (this->gpu_start);
// }
// void EventData::CUDASyncStart()
// {
// cudaEventRecord(this->gpu_end);
// cudaEventSynchronize(this->gpu_end);
// }
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
//------------------------- Jikan-config --------------------------------------------- //------------------------- Jikan-config ---------------------------------------------
#define TIMER_ON #define TIMER_ON
#define INCLUDE_GPU_TIMER // #define INCLUDE_GPU_TIMER
#define INCLUDE_MPI // #define INCLUDE_MPI
// #define INCLUDE_OPEN_MP // #define INCLUDE_OPEN_MP
#define SAVE_TIME_SERIES #define SAVE_TIME_SERIES
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
using namespace std; using namespace std;
#ifdef INCLUDE_GPU_TIMER
void Jikan::StartCUDASync(const string& name) void Jikan::StartCUDASync(const string& name)
{ {
cudaEventRecord ((this->Events)[name].gpu_start); cudaEventRecord ((this->Events)[name].gpu_start);
...@@ -32,3 +33,4 @@ void Jikan::CUDAGetTime(const string& name) ...@@ -32,3 +33,4 @@ void Jikan::CUDAGetTime(const string& name)
(this->Events)[name].time_series.push_back(GPUtime); (this->Events)[name].time_series.push_back(GPUtime);
#endif #endif
} }
#endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment