* Returns the elapsed time in milliseconds between the two recorded events. */
| 542 | * Returns the elapsed time in milliseconds between the two recorded events. |
| 543 | */ |
| 544 | static float elapsedTime(const Event& start, const Event& end) |
| 545 | { |
| 546 | float ms; |
| 547 | CUMAT_SAFE_CALL(cudaEventSynchronize(start.event())); |
| 548 | CUMAT_SAFE_CALL(cudaEventSynchronize(end.event())); |
| 549 | CUMAT_SAFE_CALL(cudaEventElapsedTime(&ms, start.event(), end.event())); |
| 550 | return ms; |
| 551 | } |
| 552 | }; |
| 553 | |
| 554 | CUMAT_NAMESPACE_END |