Skip to content

Commit 0e6afe3

Browse files
authored
Merge pull request #245 from tensorlayer/lg-fix
compatibility fix
2 parents 3c8ed52 + 1888f7e commit 0e6afe3

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

cmake/3rdparty.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,20 @@ SET(STDTENSOR_GIT_URL
2121
https://github.com/stdml/stdtensor.git
2222
CACHE STRING "URL for clone stdtensor")
2323

24+
SET(STDTENSOR_GIT_TAG
25+
"v0.9.1"
26+
CACHE STRING "git tag for checkout stdtensor")
27+
2428
EXTERNALPROJECT_ADD(
2529
stdtensor-repo
2630
LOG_DOWNLOAD ON
2731
LOG_INSTALL ON
2832
LOG_CONFIGURE ON
2933
GIT_REPOSITORY ${STDTENSOR_GIT_URL}
30-
GIT_TAG v0.9.0
34+
GIT_TAG ${STDTENSOR_GIT_TAG}
3135
PREFIX ${THIRDPARTY_PREFIX}
32-
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${THIRDPARTY_PREFIX} -DBUILD_TESTS=0
33-
-DBUILD_EXAMPLES=0)
36+
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${THIRDPARTY_PREFIX} -DBUILD_TESTS=0 #
37+
-DUSE_STRICT=0 -DBUILD_LIB=0 -DBUILD_EXAMPLES=0)
3438

3539
INCLUDE_DIRECTORIES(${THIRDPARTY_PREFIX}/include)
3640

examples/thread_pool.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ simple_thread_pool::simple_thread_pool(std::size_t sz)
1313
{
1414
std::unique_lock<std::mutex> lock(ptr->queue_mu);
1515
ptr->cv.wait(lock, [&] {
16-
return ptr->shutdown or !ptr->queue.empty();
16+
return ptr->shutdown || !ptr->queue.empty();
1717
});
18-
if (ptr->shutdown and ptr->queue.empty())
18+
if (ptr->shutdown && ptr->queue.empty())
1919
return; // Conditions to let the thread go.
2020
task = std::move(ptr->queue.front());
2121
ptr->queue.pop();
@@ -45,4 +45,4 @@ simple_thread_pool::~simple_thread_pool()
4545
m_shared_src->shutdown = true;
4646
std::atomic_signal_fence(std::memory_order_seq_cst);
4747
m_shared_src->cv.notify_all();
48-
}
48+
}

0 commit comments

Comments
 (0)