Support pinning in HostAllocator
[alexxy/gromacs.git] / src / gromacs / gpu_utils / tests / devicetransfers.cpp
index 039f4a0583a36422cb5e8e4dbf5fb0c181fed3ca..733cac22451e4aeaafeef95f0699248617fb6b64 100644 (file)
 
 #include "devicetransfers.h"
 
+#include <algorithm>
+
 #include "gromacs/utility/arrayref.h"
 
 namespace gmx
 {
 
-void doDeviceTransfers(const gmx_gpu_info_t & /*gpuInfo*/,
-                       ArrayRef<const char>   /*input*/,
-                       ArrayRef<char>         /* output */)
+void doDeviceTransfers(const gmx_gpu_info_t   & /*gpuInfo*/,
+                       ArrayRef<const char>   input,
+                       ArrayRef<char>         output)
 {
+    GMX_RELEASE_ASSERT(input.size() == output.size(), "Input and output must have matching size");
+    // We can't have any valid GPUs for this build configuration.
+    std::copy(input.begin(), input.end(), output.begin());
 }
 
 } // namespace gmx