aboutsummaryrefslogtreecommitdiff
path: root/deeptagger/deeptagger.cpp
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-01-21 17:47:56 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-01-21 17:47:56 +0100
commit7300773b96b5f6324b0b9da624f0ed34de0c1326 (patch)
tree3cda2127f67bf3c126c88c261219e4f18375b188 /deeptagger/deeptagger.cpp
parent05c3687ab15b6236533ef88fb1c8cffd79884126 (diff)
downloadgallery-7300773b96b5f6324b0b9da624f0ed34de0c1326.tar.gz
gallery-7300773b96b5f6324b0b9da624f0ed34de0c1326.tar.xz
gallery-7300773b96b5f6324b0b9da624f0ed34de0c1326.zip
deeptagger: give up on Windows altogether
ORT requires MSVC to build. MSVC can't use MSYS2 libraries. CMake + clang-cl doesn't work in MSYS2. GraphicsMagick doesn't provide development packages for Windows. There is no getopt on Windows.
Diffstat (limited to 'deeptagger/deeptagger.cpp')
-rw-r--r--deeptagger/deeptagger.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/deeptagger/deeptagger.cpp b/deeptagger/deeptagger.cpp
index 27b0a91..729eeac 100644
--- a/deeptagger/deeptagger.cpp
+++ b/deeptagger/deeptagger.cpp
@@ -116,7 +116,8 @@ read_config(Config &config, const char *path)
}
read_tags(
- std::filesystem::path(path).replace_extension("tags"), config.tags);
+ std::filesystem::path(path).replace_extension("tags").string(),
+ config.tags);
}
// --- Data preparation --------------------------------------------------------
@@ -720,7 +721,7 @@ main(int argc, char *argv[])
// Load batched images in parallel (the first is for GM, the other for IM).
if (g.batch > 1) {
auto value = std::to_string(
- std::max(std::thread::hardware_concurrency() / g.batch, 1L));
+ std::max(long(std::thread::hardware_concurrency()) / g.batch, 1L));
setenv("OMP_NUM_THREADS", value.c_str(), true);
setenv("MAGICK_THREAD_LIMIT", value.c_str(), true);
}