pub unsafe extern "C" fn cuDeviceGetP2PAttribute(
value: *mut c_int,
attrib: CUdevice_P2PAttribute,
srcDevice: CUdevice,
dstDevice: CUdevice,
) -> CUresult
Expand description
\brief Queries attributes of the link between two devices.
Returns in \p *value the value of the requested attribute \p attrib of the link between \p srcDevice and \p dstDevice. The supported attributes are:
- ::CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK: A relative value indicating the performance of the link between two devices.
- ::CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED P2P: 1 if P2P Access is enable.
- ::CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED: 1 if Atomic operations over the link are supported.
- ::CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED: 1 if cudaArray can be accessed over the link.
Returns ::CUDA_ERROR_INVALID_DEVICE if \p srcDevice or \p dstDevice are not valid or if they represent the same device.
Returns ::CUDA_ERROR_INVALID_VALUE if \p attrib is not valid or if \p value is a null pointer.
\param value - Returned value of the requested attribute \param attrib - The requested attribute of the link between \p srcDevice and \p dstDevice. \param srcDevice - The source device of the target link. \param dstDevice - The destination device of the target link.
\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_DEVICE, ::CUDA_ERROR_INVALID_VALUE \notefnerr
\sa ::cuCtxEnablePeerAccess, ::cuCtxDisablePeerAccess, ::cuDeviceCanAccessPeer, ::cudaDeviceGetP2PAttribute