| 106 | } |
| 107 | |
| 108 | void Timer::Init() { |
| 109 | if (!initted()) { |
| 110 | if (Caffe::mode() == Caffe::GPU) { |
| 111 | #ifndef CPU_ONLY |
| 112 | CUDA_CHECK(cudaEventCreate(&start_gpu_)); |
| 113 | CUDA_CHECK(cudaEventCreate(&stop_gpu_)); |
| 114 | #else |
| 115 | NO_GPU; |
| 116 | #endif |
| 117 | } |
| 118 | initted_ = true; |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | CPUTimer::CPUTimer() { |
| 123 | this->initted_ = true; |
nothing calls this directly
no outgoing calls
no test coverage detected