Computes the elapsed time between two events. This API is synchronous.
API call sequence: call aclrtCreateEvent or aclrtCreateEventWithFlag to create an event-> call aclrtRecordEvent to record the start event and end event in a stream-> call aclrtSynchronizeStream to wait until the stream tasks are complete-> call aclrtEventElapsedTime to compute the elapsed time between the two events.
aclError aclrtEventElapsedTime(float *ms, aclrtEvent startEvent, aclrtEvent endEvent)
Parameter |
Input/Output |
Description |
|---|---|---|
ms |
Output |
Pointer to the elapsed time between the start and end events, in milliseconds. |
start |
Input |
Start event. |
end |
Input |
End event. |
0 on success; else, failure.