aclrtDeviceEnablePeerAccess
Applicability
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
☓ |
|
|
√ |
|
|
√ |
Description
Enables data exchange between the current device and a specified device. This API enables device-level data exchange.
Call aclrtDeviceCanAccessPeer in advance to check whether data exchange is supported between the current device and the specified device. To disable data exchange between devices, call aclrtDeviceDisablePeerAccess.
Prototype
aclError aclrtDeviceEnablePeerAccess(int32_t peerDeviceId, uint32_t flags)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
peerDeviceId |
Input |
Device ID, which must be different from the current device ID. Must be in the range of [0, Device count – 1]. Call aclrtGetDeviceCount to obtain the device count. |
|
flags |
Input |
This parameter is reserved and must be set to 0. |
Returns
0 on success; else, failure. For details, see aclError.