Summary
Current implementation of Vector::copyDataTo methods allows for copying from host-to-host and device-to-device only. If one needs to copy from host to device one needs an additional copy operation. Need to modify Vector::copyDataTo so it can copy data from any memory space to any memory space, similar as Vector::copyDataFrom methods.
Rationale
Eliminating additional data copy when using Vector::copyDataTo calls will reduce unnecessary performance overhead. This is also required if we want to eliminate all "sloppy" data movement that Vector::getData functions do.
Description
Implement methods:
int copyDataTo(real_type* dest, index_type i, memory::MemorySpace memspaceSrc, memory::MemorySpace memspaceDst);
int copyDataTo(real_type* dest, memory::MemorySpace memspaceSrc, memory::MemorySpace memspaceDst);
that can copy from any memory space (host or device) to any memory space (host or device).
Additional information
No response
Summary
Current implementation of
Vector::copyDataTomethods allows for copying from host-to-host and device-to-device only. If one needs to copy from host to device one needs an additional copy operation. Need to modifyVector::copyDataToso it can copy data from any memory space to any memory space, similar asVector::copyDataFrommethods.Rationale
Eliminating additional data copy when using
Vector::copyDataTocalls will reduce unnecessary performance overhead. This is also required if we want to eliminate all "sloppy" data movement thatVector::getDatafunctions do.Description
Implement methods:
that can copy from any memory space (host or device) to any memory space (host or device).
Additional information
No response