Update treatment of GPU compatibility data structure
[alexxy/gromacs.git] / src / gromacs / gpu_utils / gpu_utils.cpp
index fcaed80d22eb83c273d185b5d88d3c1456d3d255..3b943dabfb31f3fd29f1d5ab39c48e1e236e5a7f 100644 (file)
@@ -33,7 +33,7 @@
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 /*! \internal \file
- *  \brief Stub functions for non-GPU builds
+ *  \brief Function definitions for non-GPU builds
  *
  *  \author Mark Abraham <mark.j.abraham@gmail.com>
  */
@@ -41,6 +41,8 @@
 
 #include "gpu_utils.h"
 
+#include "gromacs/hardware/gpu_hw_info.h"
+
 /*! \brief Set allocation functions used by the GPU host
  *
  * Since GPU support is not configured, there is no host memory to
@@ -52,3 +54,16 @@ void gpu_set_host_malloc_and_free(bool,
     *nb_alloc = nullptr;
     *nb_free  = nullptr;
 }
+
+//! This function is documented in the header file
+std::vector<int> getCompatibleGpus(const gmx_gpu_info_t & /*gpu_info*/)
+{
+    // There can't be any compatible GPUs
+    return std::vector<int>();
+}
+
+const char *getGpuCompatibilityDescription(const gmx_gpu_info_t & /*gpu_info*/,
+                                           int                    /*index*/)
+{
+    return gpu_detect_res_str[egpuNonexistent];
+}