From d98b27962d246a6db2f19e7e2d2b5c11921c001b Mon Sep 17 00:00:00 2001 From: lg Date: Fri, 10 Apr 2020 14:23:52 +0100 Subject: [PATCH 1/3] try fix #233 --- cmake/3rdparty.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmake/3rdparty.cmake b/cmake/3rdparty.cmake index d546e1ec..47433610 100644 --- a/cmake/3rdparty.cmake +++ b/cmake/3rdparty.cmake @@ -21,16 +21,21 @@ SET(STDTENSOR_GIT_URL https://github.com/stdml/stdtensor.git CACHE STRING "URL for clone stdtensor") +SET(STDTENSOR_GIT_TAG + "7f8a42b188bd75cbcec2a49bb6b9b33779343e3c" # FIXME: use stable tag (v0.9.1) + # before merge master + CACHE STRING "git tag for checkout stdtensor") + EXTERNALPROJECT_ADD( stdtensor-repo LOG_DOWNLOAD ON LOG_INSTALL ON LOG_CONFIGURE ON GIT_REPOSITORY ${STDTENSOR_GIT_URL} - GIT_TAG v0.9.0 + GIT_TAG ${STDTENSOR_GIT_TAG} PREFIX ${THIRDPARTY_PREFIX} - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${THIRDPARTY_PREFIX} -DBUILD_TESTS=0 - -DBUILD_EXAMPLES=0) + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${THIRDPARTY_PREFIX} -DBUILD_TESTS=0 # + -DUSE_STRICT=0 -DBUILD_LIB=0 -DBUILD_EXAMPLES=0) INCLUDE_DIRECTORIES(${THIRDPARTY_PREFIX}/include) From e2f2fb1738efb28d9d2dd6fa8c462584fdca8ca4 Mon Sep 17 00:00:00 2001 From: lg Date: Fri, 10 Apr 2020 21:40:26 +0100 Subject: [PATCH 2/3] ttl=v0.9.1 --- cmake/3rdparty.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/3rdparty.cmake b/cmake/3rdparty.cmake index 47433610..e163a03f 100644 --- a/cmake/3rdparty.cmake +++ b/cmake/3rdparty.cmake @@ -22,8 +22,7 @@ SET(STDTENSOR_GIT_URL CACHE STRING "URL for clone stdtensor") SET(STDTENSOR_GIT_TAG - "7f8a42b188bd75cbcec2a49bb6b9b33779343e3c" # FIXME: use stable tag (v0.9.1) - # before merge master + "v0.9.1" CACHE STRING "git tag for checkout stdtensor") EXTERNALPROJECT_ADD( From 1888f7eab6196eda6ad0868044e8eef7bc2545ce Mon Sep 17 00:00:00 2001 From: lg Date: Fri, 10 Apr 2020 21:45:26 +0100 Subject: [PATCH 3/3] use &&, || instead of and, or for windows --- examples/thread_pool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/thread_pool.cpp b/examples/thread_pool.cpp index 49cd8395..ca4a95d1 100644 --- a/examples/thread_pool.cpp +++ b/examples/thread_pool.cpp @@ -13,9 +13,9 @@ simple_thread_pool::simple_thread_pool(std::size_t sz) { std::unique_lock lock(ptr->queue_mu); ptr->cv.wait(lock, [&] { - return ptr->shutdown or !ptr->queue.empty(); + return ptr->shutdown || !ptr->queue.empty(); }); - if (ptr->shutdown and ptr->queue.empty()) + if (ptr->shutdown && ptr->queue.empty()) return; // Conditions to let the thread go. task = std::move(ptr->queue.front()); ptr->queue.pop(); @@ -45,4 +45,4 @@ simple_thread_pool::~simple_thread_pool() m_shared_src->shutdown = true; std::atomic_signal_fence(std::memory_order_seq_cst); m_shared_src->cv.notify_all(); -} \ No newline at end of file +}