aclmdlRICaptureThreadExchangeMode
Note: This feature is for trial use and may be changed in later versions. It is not available in commercial products.
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
☓ |
|
☓ |
|
☓ |
Description
Switches the capture mode of the current thread.
Calling this API will set the capture mode of the calling thread to the value contained in *mode, and return the previously set mode of the thread through *mode.
Prototype
aclError aclmdlRICaptureThreadExchangeMode(aclmdlRICaptureMode *mode)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
mode |
Input/Output |
Capture mode. This mode is used to limit the scope of unsafe functions, including aclrtMemset, aclrtMemcpy, aclrtMemcpy2d, and APIs (such as aclrtMemcpyAsync) that use non-page-locked host memory for asynchronous memory copy. It is recommended that this API be called between aclmdlRICaptureBegin and aclmdlRICaptureEnd to switch the mode of the current thread. The configurations of all capture modes are described below. Other threads in the description refer to threads that do not call aclmdlRICaptureBegin and are not in the capture state.
|
Returns
0 on success; else, failure. For details, see aclError.