aclrtSnapShotCallbackRegister
Note: This API is for trial use and may be changed in later versions. It is not available in commercial products.
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
x |
√ |
|
√ |
|
x |
|
x |
|
x |
Function
Registers a callback function to be called at a specific phase of a snapshot operation. Repeated registration is not supported.
Prototype
1 | aclError aclrtSnapShotCallbackRegister(aclrtSnapShotStage stage, aclrtSnapShotCallBack callback, void *args) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
stage |
Input |
Snapshot phase for triggering the callback. For the type definition, see aclrtSnapShotStage. |
callback |
Input |
Pointer to the callback function. Once the specified snapshot phase is reached, the system automatically calls this function. Function definition: typedef uint32_t (*aclrtSnapShotCallBack)(int32_t deviceId, void* args); |
args |
Input |
Pointer to user-defined parameters passed when the callback function is called. The parameter value can be NULL, indicating that no additional parameters need to be passed. |
Returns
0 on success; otherwise, failure. For details, see aclError.