Library/ManagedCuda/CudaGraphicsInteropResourceCollection.cs
/// <summary>
/// Maps all graphics resources for access by CUDA.<para/>
/// The resources may be accessed by CUDA until they are 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="MapAllResources()"/>
/// will complete before any subsequent CUDA work issued in <c>stream</c> begins.<para/>
/// If any of the resources is presently mapped for access by CUDA then <see cref="CUResult.ErrorAlreadyMapped"/> exception is thrown.
/// </summary>
/// <param name="stream"></param>
Maps all graphics resources for access by CUDA.
The resources may be accessed by CUDA until they are 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 any of the resources is presently mapped for access by CUDA then  exception is thrown.
Maps all graphics resources for access by CUDA . The resources may be accessed by CUDA until they are 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 any of the resources is presently mapped for access by CUDA then exception is thrown .
public void MapAllResources(CUstream stream)
        {
            if (disposed) throw new ObjectDisposedException(this.ToString());
            CUResult res;
            res = DriverAPINativeMethods.GraphicsInterop.cuGraphicsMapResources((uint) _CUResources.Count, _CUResources.ToArray(), stream);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphicsMapResources", res));
            if (res != CUResult.Success)
                throw new CudaException(res);
            foreach (var elem in _resources)
                elem.SetIsMapped();
        }
public void MapAllResources ( CUstream stream ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; CUResult res ; res = DriverAPINativeMethods . GraphicsInterop . cuGraphicsMapResources ( ( uint ) _CUResources . Count , _CUResources . ToArray ( ) , stream ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; foreach ( var elem in _resources ) elem . SetIsMapped ( ) ; }
Maps all graphics resources for access by CUDA.
Maps all graphics resources for access by CUDA .
stream
CUstream
None