// Returns whether peer access is possible between device and peerDevice. func DeviceCanAccessPeer(device, peerDevice int) bool { var can C.int err := Error(C.cudaDeviceCanAccessPeer(&can, C.int(device), C.int(peerDevice))) if err != Success { panic(err) } return int(can) != 0 }
func deviceCanAccessPeer(h1, h2 handle) (bool, error) { var ok C.int r := C.cudaDeviceCanAccessPeer(&ok, h1.dev, h2.dev) return (ok != 0), errorString(r) }
func CanAccessPeer(dev1, dev2 *Device) (bool, error) { var ok C.int err := cudaErr(C.cudaDeviceCanAccessPeer(&ok, dev1.handle, dev2.handle)) return (ok != 0), err }