From ade6d3a9ac778bfe9ff7027a38a9aec73ab6c2f3 Mon Sep 17 00:00:00 2001 From: Tim Dewhirst Date: Wed, 4 May 2022 07:27:16 +0200 Subject: [PATCH 1/2] remove spdlog references from README.md #20 --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 414d684..933db85 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,6 @@ These are captured in `vcpkg.json`: * [vcpkg](https://github.com/Microsoft/vcpkg) * catch2: unit test framework * libtiff: TIFF IO support - * spdlog: logging framework * benchmark: used to run performance benchmarks * async++ (optional): implements c++17 parallel algorithms * cxxopts: nice command line parsing @@ -183,11 +182,6 @@ These are captured in `vcpkg.json`: * [average_subtract](examples/average_subtract/README.md): a utility to read in n images, find the average and write out n new images with the mean subtracted -## Logging - -Logging is done via [spdlog](https://github.com/gabime/spdlog), to change the -log level you can use the environmental variable `SPDLOG_LEVEL=`. - # TODO * build From 87810c9d2a404f5fce97ba214ad03c5decc77ba6 Mon Sep 17 00:00:00 2001 From: Tim Dewhirst Date: Thu, 26 May 2022 08:31:53 +0100 Subject: [PATCH 2/2] explicitly handle case of single thread processing #26 --- examples/process/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/process/main.cpp b/examples/process/main.cpp index 3d540da..e9a9137 100644 --- a/examples/process/main.cpp +++ b/examples/process/main.cpp @@ -183,6 +183,16 @@ int main( int argc, char* argv[] ) }; // check execution + if (thread_count <= 1) + { + logger::info("processing using single thread"); + size_t i = 0; + for ( const auto& ia : grid ) + { + processor(i++, ia); + } + } + else #if defined(ASYNCPLUSPLUS) if ( execution == "async++" ) {