Need deep copy and host mirror for AoSoA

Two final memory utilities are needed before MPI-based data structures may be implemented with AoSoA for distributed parallel operations.

  • The AoSoA needs a deep_copy function for copying data between containers in with potentially different inner array sizes and memory spaces. This action will always copy the data from one container to the other.
  • The AoSoA needs an implementation of the HostMirror concept. This concept creates an 'AoSoA' container on the host that mirros another AoSoA that is in a potentially different memory space and allows for more straightforward syncing between them for MPI-based communications. Creating a HostMirror may mean of shallow copy if the memory spaces of are compatible or a deep copy if they are not. For example, CudaUVMSpace is compatible with host space and will therefore not require a deep copy while CudaSpace requires a deep copy because it is not accessible from the host.
Edited by Slattery, Stuart