| 49 | } |
| 50 | |
| 51 | void GpuTimer::Destroy() { |
| 52 | GpuContext* context = parent_->gpu_context(); |
| 53 | port::Status status = GpuDriver::DestroyEvent(context, &start_event_); |
| 54 | if (!status.ok()) { |
| 55 | LOG(ERROR) << status; |
| 56 | } |
| 57 | |
| 58 | status = GpuDriver::DestroyEvent(context, &stop_event_); |
| 59 | if (!status.ok()) { |
| 60 | LOG(ERROR) << status; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | float GpuTimer::GetElapsedMilliseconds() const { |
| 65 | CHECK(start_event_ != nullptr && stop_event_ != nullptr); |
no test coverage detected