#include "config.h"
#include <array>
+#include <vector>
#include <gtest/gtest.h>
GpuEventSynchronizer coordinatesReadyOnDeviceEvent;
coordinatesReadyOnDeviceEvent.markEvent(deviceStream);
- std::vector<std::unique_ptr<gmx::GpuHaloExchange>> gpuHaloExchange[DIM];
+ std::array<std::vector<GpuHaloExchange>, DIM> gpuHaloExchange;
// Create halo exchange objects
for (int d = 0; d < dd->ndim; d++)
{
for (int pulse = 0; pulse < dd->comm->cd[d].numPulses(); pulse++)
{
- gpuHaloExchange[d].push_back(std::make_unique<GpuHaloExchange>(
- dd, d, MPI_COMM_WORLD, deviceContext, deviceStream, deviceStream, pulse, nullptr));
+ gpuHaloExchange[d].push_back(GpuHaloExchange(dd, d, MPI_COMM_WORLD, deviceContext,
+ deviceStream, deviceStream, pulse, nullptr));
}
}
{
for (int pulse = 0; pulse < dd->comm->cd[d].numPulses(); pulse++)
{
- gpuHaloExchange[d][pulse]->reinitHalo(d_x, nullptr);
- gpuHaloExchange[d][pulse]->communicateHaloCoordinates(box, &coordinatesReadyOnDeviceEvent);
+ gpuHaloExchange[d][pulse].reinitHalo(d_x, nullptr);
+ gpuHaloExchange[d][pulse].communicateHaloCoordinates(box, &coordinatesReadyOnDeviceEvent);
}
}