Library/ManagedCuda/CudaDirectXInteropResource.cs
/// <summary>
/// Maps the graphics resource for access by CUDA.<para/>
/// The resource may be accessed by CUDA until it is unmapped. The graphics API from which the resource
/// was registered should not access any resources while they are mapped by CUDA. If an application does
/// so, the results are undefined.<para/>
/// This function provides the synchronization guarantee that any graphics calls issued before <see cref="Map()"/>
/// will complete before any subsequent CUDA work issued in <c>stream</c> begins.<para/>
/// If the resource is presently mapped for access by CUDA then <see cref="CUResult.ErrorAlreadyMapped"/> exception is thrown.
/// </summary>
/// <param name="stream"></param>
Maps the graphics resource for access by CUDA.
The resource may be accessed by CUDA until it is unmapped. The graphics API from which the resource
was registered should not access any resources while they are mapped by CUDA. If an application does
so, the results are undefined.
This function provides the synchronization guarantee that any graphics calls issued before
will complete before any subsequent CUDA work issued in stream
If the resource is presently mapped for access by CUDA then  exception is thrown.
Maps the graphics resource for access by CUDA . The resource may be accessed by CUDA until it is unmapped . The graphics API from which the resource was registered should not access any resources while they are mapped by CUDA . If an application does so the results are undefined . This function provides the synchronization guarantee that any graphics calls issued before will complete before any subsequent CUDA work issued in stream If the resource is presently mapped for access by CUDA then exception is thrown .
public void Map(CUstream stream)
        {
            if (disposed) throw new ObjectDisposedException(this.ToString());
            res = DriverAPINativeMethods.GraphicsInterop.cuGraphicsMapResources(1, ref _cudaResource, stream);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphicsMapResources", res));
            if (res != CUResult.Success)
                throw new CudaException(res);
            _IsMapped = true;
        }
public void Map ( CUstream stream ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; res = DriverAPINativeMethods . GraphicsInterop . cuGraphicsMapResources ( 1 , ref _cudaResource , stream ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; _IsMapped = true ; }
Maps the graphics resource for access by CUDA.
Maps the graphics resource for access by CUDA .
stream
CUstream
None