Library/ManagedCuda/CudaContext.cs
/// <summary>
/// Queries if a device may directly access a peer device's memory
/// </summary>
/// <returns></returns>
Queries if a device may directly access a peer device's memory
Queries if a device may directly access a peer device ' s memory
public bool DeviceCanAccessPeer(CudaContext peerContext)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			CUResult res;
			int canAccessPeer = 0;
			res = DriverAPINativeMethods.CudaPeerAccess.cuDeviceCanAccessPeer(ref canAccessPeer, _device, peerContext.Device);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuDeviceCanAccessPeer", res));
			if (res != CUResult.Success) throw new CudaException(res);
			return canAccessPeer != 0;
		}
public bool DeviceCanAccessPeer ( CudaContext peerContext ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; CUResult res ; int canAccessPeer = 0 ; res = DriverAPINativeMethods . CudaPeerAccess . cuDeviceCanAccessPeer ( ref canAccessPeer , _device , peerContext . Device ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; return canAccessPeer != 0 ; }
Queries if a device may directly access a peer device's memory
Queries if a device may directly access a peer device ' s memory
None
peerContext
CudaContext