summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-03 23:22:31 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-08 00:12:07 +0100
commit7d88bebfeb9931a39c6adc1e9dc9d6e1c0e3ea71 (patch)
tree7fb0716728ca91a30490b15fd8682c860f7d57e4 /src/lib
parenteef48c36012180d20001def874864607e15968b8 (diff)
Get gpu_lister path from config.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/grok/util.cc5
-rw-r--r--src/lib/grok/util.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/grok/util.cc b/src/lib/grok/util.cc
index 8a6d2c4f9..3cbc55678 100644
--- a/src/lib/grok/util.cc
+++ b/src/lib/grok/util.cc
@@ -20,6 +20,7 @@
#include "util.h"
+#include "../config.h"
#include <boost/process.hpp>
#include <future>
@@ -29,10 +30,12 @@ using std::vector;
vector<string>
-get_gpu_names(boost::filesystem::path binary)
+get_gpu_names()
{
namespace bp = boost::process;
+ auto binary = Config::instance()->grok().binary_location / "gpu_lister";
+
bp::ipstream stream;
bp::child child(binary, bp::std_out > stream);
diff --git a/src/lib/grok/util.h b/src/lib/grok/util.h
index 9996fa0e9..a78ecabca 100644
--- a/src/lib/grok/util.h
+++ b/src/lib/grok/util.h
@@ -24,4 +24,4 @@
#include <vector>
-extern std::vector<std::string> get_gpu_names(boost::filesystem::path binary);
+extern std::vector<std::string> get_gpu_names();