Library/ManagedCuda/CudaDirectXInteropResource.cs
/// <summary>
/// Returns in <c>devicePtr</c> a pointer through which the mapped graphics resource may be accessed. Returns
/// in <c>size</c> the size of the memory in bytes which may be accessed from that pointer. The value set in <c>devicePtr</c> may
/// change every time that the resource is mapped.<para/>
/// If the resource is not a buffer then it cannot be accessed via a pointer and <see cref="CUResult.ErrorNotMappedAsPointer"/>
/// exception is thrown. If the resource is not mapped then <see cref="CUResult.ErrorNotMapped"/> exception is thrown.
/// </summary>
/// <returns></returns>
Returns in devicePtrsizedevicePtr
If the resource is not a buffer then it cannot be accessed via a pointer and
exception is thrown. If the resource is not mapped then  exception is thrown.
Returns in devicePtrsizedevicePtr If the resource is not a buffer then it cannot be accessed via a pointer and exception is thrown . If the resource is not mapped then exception is thrown .
public void GetMappedPointer(out CUdeviceptr devicePtr, out SizeT size)
        {
            if (disposed) throw new ObjectDisposedException(this.ToString());
            devicePtr = new CUdeviceptr();
            size = 0;
            res = DriverAPINativeMethods.GraphicsInterop.cuGraphicsResourceGetMappedPointer_v2(ref devicePtr, ref size, _cudaResource);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphicsResourceGetMappedPointer", res));
            if (res != CUResult.Success)
                throw new CudaException(res);
        }
public void GetMappedPointer ( out CUdeviceptr devicePtr , out SizeT size ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; devicePtr = new CUdeviceptr ( ) ; size = 0 ; res = DriverAPINativeMethods . GraphicsInterop . cuGraphicsResourceGetMappedPointer_v2 ( ref devicePtr , ref size , _cudaResource ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; }
Returns in devicePtrsizedevicePtr
If the resource is not a buffer then it cannot be accessed via a pointer and
exception is thrown.
Returns in devicePtrsizedevicePtr If the resource is not a buffer then it cannot be accessed via a pointer and exception is thrown .
None
CUdeviceptr
out
SizeT
out