mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Merged eigen/eigen into default
This commit is contained in:
@@ -23,11 +23,11 @@ static void test_create_destroy_empty_pool()
|
||||
}
|
||||
|
||||
|
||||
static void test_parallelism()
|
||||
static void test_parallelism(bool allow_spinning)
|
||||
{
|
||||
// Test we never-ever fail to match available tasks with idle threads.
|
||||
const int kThreads = 16; // code below expects that this is a multiple of 4
|
||||
NonBlockingThreadPool tp(kThreads);
|
||||
NonBlockingThreadPool tp(kThreads, allow_spinning);
|
||||
VERIFY_IS_EQUAL(tp.NumThreads(), kThreads);
|
||||
VERIFY_IS_EQUAL(tp.CurrentThreadId(), -1);
|
||||
for (int iter = 0; iter < 100; ++iter) {
|
||||
@@ -119,6 +119,7 @@ static void test_cancel()
|
||||
void test_cxx11_non_blocking_thread_pool()
|
||||
{
|
||||
CALL_SUBTEST(test_create_destroy_empty_pool());
|
||||
CALL_SUBTEST(test_parallelism());
|
||||
CALL_SUBTEST(test_parallelism(true));
|
||||
CALL_SUBTEST(test_parallelism(false));
|
||||
CALL_SUBTEST(test_cancel());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user