Library/ManagedCuda/CudaContext.cs
/// <summary>
/// If both the current context (current to the calling thread) and <c>peerContext</c> are on devices which support unified 
/// addressing (as may be queried using GetDeviceInfo), then
/// on success all allocations from <c>peerContext</c> will immediately be accessible
/// by the current context.  See \ref CUDA_UNIFIED for additional
/// details. <para/>
/// Note that access granted by this call is unidirectional and that in order to access
/// memory from the current context in <c>peerContext</c>, a separate symmetric call 
/// to ::cuCtxEnablePeerAccess() is required. <para/>
/// Returns <see cref="CUResult.ErrorInvalidDevice"/> if <see cref="DeviceCanAccessPeer"/> indicates
/// that the CUdevice of the current context cannot directly access memory
/// from the CUdevice of <c>peerContext</c>. <para/>
/// Throws <see cref="CUResult.ErrorPeerAccessAlreadyEnabled"/> if direct access of
/// <c>peerContext</c> from the current context has already been enabled. <para/>
/// Throws <see cref="CUResult.ErrorInvalidContext"/> if there is no current context, <c>peerContext</c>
/// is not a valid context, or if the current context is <c>peerContext</c>. <para/>
/// </summary>
/// <param name="peerContext">Peer context to enable direct access to from the current context</param>
/// <returns></returns>
If both the current context (current to the calling thread) and peerContextpeerContext
Note that access granted by this call is unidirectional and that in order to access
memory from the current context in peerContext
Returns  if  indicates
that the CUdevice of the current context cannot directly access memory
from the CUdevice of peerContext
Throws  if direct access of
peerContext
Throws  if there is no current context, peerContextpeerContext
If both the current context ( current to the calling thread ) and peerContextpeerContext Note that access granted by this call is unidirectional and that in order to access memory from the current context in peerContext Returns if indicates that the CUdevice of the current context cannot directly access memory from the CUdevice of peerContext Throws if direct access of peerContext Throws if there is no current context peerContextpeerContext
public static void EnablePeerAccess(CudaContext peerContext)
		{
			CUResult res;
			res = DriverAPINativeMethods.CudaPeerAccess.cuCtxEnablePeerAccess(peerContext.Context, 0);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuCtxEnablePeerAccess", res));
			if (res != CUResult.Success) throw new CudaException(res);
		}
public static void EnablePeerAccess ( CudaContext peerContext ) { CUResult res ; res = DriverAPINativeMethods . CudaPeerAccess . cuCtxEnablePeerAccess ( peerContext . Context , 0 ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; }
If both the current context (current to the calling thread) and peerContextpeerContext
Note that access granted by this call is unidirectional and that in order to access
memory from the current context in peerContext
Returns  if  indicates
that the CUdevice of the current context cannot directly access memory
from the CUdevice of peerContext
Throws  if direct access of
peerContext
Throws  if there is no current context, peerContextpeerContext
If both the current context ( current to the calling thread ) and peerContextpeerContext Note that access granted by this call is unidirectional and that in order to access memory from the current context in peerContext Returns if indicates that the CUdevice of the current context cannot directly access memory from the CUdevice of peerContext Throws if direct access of peerContext Throws if there is no current context peerContextpeerContext
None
peerContext
CudaContext
Peer context to enable direct access to from the current context
Peer context to enable direct access to from the current context