Skip to content

Commit

Permalink
fixing formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Bettina Heim <[email protected]>
  • Loading branch information
bettinaheim committed Dec 11, 2024
1 parent aec43f2 commit b8451d6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions runtime/cudaq/platform/mqpu/helpers/MQPUUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,20 @@ cudaq::AutoLaunchRestServerProcess::AutoLaunchRestServerProcess(
libPaths += ":";

std::set<std::string> libDirs;
while(libPaths.size() > 0) {
while (libPaths.size() > 0) {
auto next_delim = libPaths.find(":");
if(next_delim < libPaths.size()) {
if (next_delim < libPaths.size()) {
std::filesystem::path lib(libPaths.substr(0, next_delim));
libPaths = libPaths.substr(next_delim + 1);
auto libDir = lib.remove_filename().string();
if(libDir.size() > 0)
if (libDir.size() > 0)
libDirs.insert(libDir);
}
}

std::string dynLibs = std::accumulate(std::begin(libDirs),
std::end(libDirs),
std::string{},
[](const std::string& a, const std::string &b) {
return a + b + ':'; });
std::string dynLibs = std::accumulate(
std::begin(libDirs), std::end(libDirs), std::string{},
[](const std::string &a, const std::string &b) { return a + b + ':'; });
dynLibs.pop_back();
if (auto *p = getenv("LD_LIBRARY_PATH")) {
std::string envLibs = p;
Expand Down

0 comments on commit b8451d6

Please sign in to comment.