* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 2010-2018, The GROMACS development team.
- * Copyright (c) 2019, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
return 0;
}
-void init_gpu(const gmx_device_info_t* deviceInfo)
+void init_gpu(const DeviceInformation* deviceInfo)
{
cudaError_t stat;
}
}
-void free_gpu(const gmx_device_info_t* deviceInfo)
+void free_gpu(const DeviceInformation* deviceInfo)
{
// One should only attempt to clear the device context when
// it has been used, but currently the only way to know that a GPU
}
}
-gmx_device_info_t* getDeviceInfo(const gmx_gpu_info_t& gpu_info, int deviceId)
+DeviceInformation* getDeviceInfo(const gmx_gpu_info_t& gpu_info, int deviceId)
{
if (deviceId < 0 || deviceId >= gpu_info.n_dev)
{
gmx_incons("Invalid GPU deviceId requested");
}
- return &gpu_info.gpu_dev[deviceId];
+ return &gpu_info.deviceInfo[deviceId];
}
/*! \brief Returns true if the gpu characterized by the device properties is
// We expect to start device support/sanity checks with a clean runtime error state
gmx::ensureNoPendingCudaError("");
- gmx_device_info_t* devs;
+ DeviceInformation* devs;
snew(devs, ndev);
for (int i = 0; i < ndev; i++)
{
cudaGetErrorName(stat), cudaGetErrorString(stat))
.c_str());
- gpu_info->n_dev = ndev;
- gpu_info->gpu_dev = devs;
+ gpu_info->n_dev = ndev;
+ gpu_info->deviceInfo = devs;
}
void get_gpu_device_info_string(char* s, const gmx_gpu_info_t& gpu_info, int index)
return;
}
- gmx_device_info_t* dinfo = &gpu_info.gpu_dev[index];
+ DeviceInformation* dinfo = &gpu_info.deviceInfo[index];
bool bGpuExists = (dinfo->stat != egpuNonexistent && dinfo->stat != egpuInsane);
size_t sizeof_gpu_dev_info(void)
{
- return sizeof(gmx_device_info_t);
+ return sizeof(DeviceInformation);
}
void startGpuProfiler(void)
int gpu_info_get_stat(const gmx_gpu_info_t& info, int index)
{
- return info.gpu_dev[index].stat;
+ return info.deviceInfo[index].stat;
}
/*! \brief Check status returned from peer access CUDA call, and error out or warn appropriately