code: public static int cuDeviceGetP2PAttribute(int value[], int attrib, CUdevice srcDevice, CUdevice dstDevice)
      {
          return checkResult(cuDeviceGetP2PAttributeNative(value, attrib, srcDevice, dstDevice));
      }
docs: Queries attributes of the link between two devices.<br>
  <br>
  Returns in *value the value of the requested attribute attrib of the
  link between srcDevice and dstDevice. The supported attributes are:
  <ul>
  <li>CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK: A relative value indicating the
  performance of the link between two devices.</li>
  <li>CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED P2P: 1 if P2P Access is enable.</li>
  <li>CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED: 1 if Atomic operations over
  the link are supported.</li>
  </ul>
  Returns ::CUDA_ERROR_INVALID_DEVICE if srcDevice or dstDevice are not valid
  or if they represent the same device.<br>
  <br>
  Returns ::CUDA_ERROR_INVALID_VALUE if attrib is not valid or if value is
  a null pointer.<br>
  
  @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
  
  @see JCudaDriver#cuCtxEnablePeerAccess
  @see JCudaDriver#cuCtxDisablePeerAccess
  @see JCudaDriver#cuCtxCanAccessPeer