Function rcudnn::cudaDeviceEnablePeerAccess[][src]

pub unsafe extern "C" fn cudaDeviceEnablePeerAccess(
    peerDevice: i32,
    flags: u32
) -> cudaError
Expand description

\brief Enables direct access to memory allocations on a peer device.

On success, all allocations from \p peerDevice will immediately be accessible by the current device. They will remain accessible until access is explicitly disabled using ::cudaDeviceDisablePeerAccess() or either device is reset using ::cudaDeviceReset().

Note that access granted by this call is unidirectional and that in order to access memory on the current device from \p peerDevice, a separate symmetric call to ::cudaDeviceEnablePeerAccess() is required.

Note that there are both device-wide and system-wide limitations per system configuration, as noted in the CUDA Programming Guide under the section “Peer-to-Peer Memory Access”.

Returns ::cudaErrorInvalidDevice if ::cudaDeviceCanAccessPeer() indicates that the current device cannot directly access memory from \p peerDevice.

Returns ::cudaErrorPeerAccessAlreadyEnabled if direct access of \p peerDevice from the current device has already been enabled.

Returns ::cudaErrorInvalidValue if \p flags is not 0.

\param peerDevice - Peer device to enable direct access to from the current device \param flags - Reserved for future use and must be set to 0

\return ::cudaSuccess, ::cudaErrorInvalidDevice, ::cudaErrorPeerAccessAlreadyEnabled, ::cudaErrorInvalidValue \notefnerr \note_init_rt \note_callback

\sa ::cudaDeviceCanAccessPeer, ::cudaDeviceDisablePeerAccess, ::cuCtxEnablePeerAccess