diff --git a/cmake/3rdparty.cmake b/cmake/3rdparty.cmake index d546e1ec..e163a03f 100644 --- a/cmake/3rdparty.cmake +++ b/cmake/3rdparty.cmake @@ -21,16 +21,20 @@ SET(STDTENSOR_GIT_URL https://github.com/stdml/stdtensor.git CACHE STRING "URL for clone stdtensor") +SET(STDTENSOR_GIT_TAG + "v0.9.1" + 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) 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 +}