Library/ManagedCuda/CudaPageLockedHostMemory3DFixedTypes.cs
/// <summary>
/// Synchron copy 3D Array to host
/// </summary>
/// <param name="deviceArray"></param>
Synchron copy 3D Array to host
Synchron copy 3D Array to host
public void SynchronCopyFromArray3D(CUarray deviceArray)
        {
            if (disposed) throw new ObjectDisposedException(this.ToString());
            CUDAMemCpy3D cpyProps = new CUDAMemCpy3D();
            cpyProps.srcArray = deviceArray;
            cpyProps.srcMemoryType = CUMemoryType.Array;
            cpyProps.dstHost = _intPtr;
            cpyProps.dstMemoryType = CUMemoryType.Host;
            cpyProps.dstPitch = _pitchInBytes;
            cpyProps.WidthInBytes = _width * _typeSize;
            cpyProps.Height = _height;
            cpyProps.Depth = _depth;
            res = DriverAPINativeMethods.SynchronousMemcpy_v2.cuMemcpy3D_v2(ref cpyProps);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMemcpy3D", res));
            if (res != CUResult.Success) throw new CudaException(res);
        }
public void SynchronCopyFromArray3D ( CUarray deviceArray ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; CUDAMemCpy3D cpyProps = new CUDAMemCpy3D ( ) ; cpyProps . srcArray = deviceArray ; cpyProps . srcMemoryType = CUMemoryType . Array ; cpyProps . dstHost = _intPtr ; cpyProps . dstMemoryType = CUMemoryType . Host ; cpyProps . dstPitch = _pitchInBytes ; cpyProps . WidthInBytes = _width * _typeSize ; cpyProps . Height = _height ; cpyProps . Depth = _depth ; res = DriverAPINativeMethods . SynchronousMemcpy_v2 . cuMemcpy3D_v2 ( ref cpyProps ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; }
Synchron copy 3D Array to host
Synchron copy 3D Array to host
deviceArray
CUarray
None