| 38 | namespace |
| 39 | { |
| 40 | std::optional<int> parseCUDADevice(const std::string& gpuBackend) |
| 41 | { |
| 42 | const std::regex regex(R"(^\s*cuda:(\d+)\s*$)"); |
| 43 | std::smatch match; |
| 44 | |
| 45 | if (std::regex_match(gpuBackend, match, regex)) |
| 46 | return std::stoi(match[1].str()); |
| 47 | |
| 48 | return std::nullopt; |
| 49 | } |
| 50 | |
| 51 | mitk::IPreferences* GetPreferences() |
| 52 | { |