code: public static int cudaDeviceGetP2PAttribute(int value[], int attr, int srcDevice, int dstDevice)
      {
          return checkResult(cudaDeviceGetP2PAttributeNative(value, attr, 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>CudaDevP2PAttrPerformanceRank: A relative value indicating the
  performance of the link between two devices. Lower value means better
  performance (0 being the value used for most performant link).
  </li>
  <li>CudaDevP2PAttrAccessSupported: 1 if peer access is enabled.</li>
  <li>CudaDevP2PAttrNativeAtomicSupported: 1 if native atomic operations over
  the link are supported.
  </li>
  </ul>
  <br>
  Returns ::cudaErrorInvalidDevice if srcDevice or dstDevice are not valid
  or if they represent the same device.<br>
  <br>
  Returns ::cudaErrorInvalidValue 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 srcDevice and dstDevice.
  @param srcDevice The source device of the target link.
  @param dstDevice The destination device of the target link.
  
  @return cudaSuccess, cudaErrorInvalidDevice, cudaErrorInvalidValue
  
  @see JCuda#cudaCtxEnablePeerAccess
  @see JCuda#cudaCtxDisablePeerAccess
  @see JCuda#cudaCtxCanAccessPeer