aclrtEventElapsedTime
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Description
Computes the elapsed time between two events.
This API must be used with other key APIs. The API call sequence is as follows: 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 completed --> Call aclrtEventElapsedTime to compute the elapsed time between two events.
Prototype
1
|
aclError aclrtEventElapsedTime(float *ms, aclrtEvent startEvent, aclrtEvent endEvent) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
ms |
Output |
Pointer to the elapsed time between the start and end events, in milliseconds. |
|
startEvent |
Input |
Start event. For details about the type definition, see aclrtEvent. |
|
endEvent |
Input |
End event. For details about the type definition, see aclrtEvent. |
Returns
0 on success; otherwise, failure. For details, see aclError.