public virtual void CopyToMemoryBlockAsync(MyMemoryBlock <T> destination, int srcOffset, int destOffset, int count, CudaStream stream = null) { destination.GetDevice(Owner.GPU).AsyncCopyToDevice( Device[Owner.GPU], srcOffset * ESize, destOffset * ESize, count * ESize, MyKernelFactory.GetCuStreamOrDefault(stream)); }
// TODO(Premek): Add more copy functions to be consistent with Async variants. (And cleanup the API in general.) #region Async copy device to device public virtual void CopyFromMemoryBlockAsync(MyMemoryBlock <T> source, int srcOffset, int destOffset, int count, CudaStream stream = null) { Device[Owner.GPU].AsyncCopyToDevice( source.GetDevice(Owner.GPU), srcOffset * ESize, destOffset * ESize, count * ESize, MyKernelFactory.GetCuStreamOrDefault(stream)); }
public virtual void FillAsync(uint value, CudaStream stream = null) { Device[Owner.GPU].MemsetAsync(value, MyKernelFactory.GetCuStreamOrDefault(stream)); }
/// <summary> /// Asynchonously copies the whole block or part of it when the destination is not large enough. /// </summary> public virtual void CopyToMemoryBlockAsync(MyMemoryBlock <T> destination, CudaStream stream = null) { destination.GetDevice(Owner.GPU).AsyncCopyToDevice(Device[Owner.GPU], MyKernelFactory.GetCuStreamOrDefault(stream)); }
/// <summary> /// Asynchonously copies the whole source block or part of it when the destination is not large enough. /// </summary> public virtual void CopyFromMemoryBlockAsync(MyMemoryBlock <T> source, CudaStream stream = null) { Device[Owner.GPU].AsyncCopyToDevice(source.GetDevice(Owner.GPU), MyKernelFactory.GetCuStreamOrDefault(stream)); }