aclrtCreateEvent
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Creates an event, which can be used to compute the elapsed time between two events and synchronize tasks between streams.
Prototype
1 | aclError aclrtCreateEvent(aclrtEvent *event) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
event |
Output |
Event pointer. For details about the type definition, see aclrtEvent. |
Returns
0 on success; otherwise, failure. For details, see aclError.
Restrictions
Events created with this API cannot be used in the aclrtResetEvent API. Otherwise, undefined behavior may occur.
Calling this API to create an event does not allocate actual event resources. Resources are allocated only when aclrtRecordEvent is called; therefore, calling aclrtRecordEvent may cause the thread to block while waiting for event resources to be released.
The number of events supported varies depending on the hardware model, as shown in the following table.
Model |
Max. Events for a Device |
|---|---|
1,023 |
|
65,535 |
|
Atlas 350 Accelerator Card |
65536 |