Disconnect
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
Atlas 350 Accelerator Card |
x |
|
|
√ |
|
|
√ |
|
|
x |
|
|
x |
|
|
x |
Note: For
Function Description
Disconnects a link with the remote HIXL instance.
Prototype
1
|
Status Disconnect(const AscendString &remote_engine, int32_t timeout_in_millis = 1000) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
remote_engine |
Input |
Unique identifier of the remote HIXL instance. |
|
timeout_in_millis |
Input |
Link disconnection timeout interval, in milliseconds. The default value is 1000. |
Example
Click GitCode, select the matching version, and obtain the sample from the examples/cpp directory.
Returns
- SUCCESS: Success.
- PARAM_INVALID: Incorrect parameter.
- NOT_CONNECTED: No link is established with the peer end.
- Other values: Failure.
Restrictions
- Before calling this API, call the Initialize API to complete initialization.
- This API and Initialize must run in the same thread. If you need to switch threads to call this API, first call aclrtGetCurrentContext in Application Development (C&C++) in the thread where Initialize is running to obtain the context. Then, in the new thread, call aclrtSetCurrentContext in Application Development (C&C++) to set the context.