@@ -16,7 +16,7 @@ TEST_CASE("Taskflow.Builder" * doctest::timeout(5)){
1616 size_t num_workers = 4 ;
1717 size_t num_tasks = 100 ;
1818
19- tf::Taskflow tf (num_workers);
19+ tf::Taskflow tf (static_cast < unsigned >( num_workers) );
2020 REQUIRE (tf.num_workers () == num_workers);
2121
2222 std::atomic<int > counter {0 };
@@ -184,7 +184,7 @@ TEST_CASE("Taskflow.Dispatch" * doctest::timeout(5)) {
184184 size_t num_workers = 4 ;
185185 size_t num_tasks = 100 ;
186186
187- tf::Taskflow tf (num_workers);
187+ tf::Taskflow tf (static_cast < unsigned >( num_workers) );
188188 REQUIRE (tf.num_workers () == num_workers);
189189
190190 std::atomic<int > counter {0 };
@@ -224,7 +224,7 @@ TEST_CASE("Taskflow.ParallelFor" * doctest::timeout(5)) {
224224 using namespace std ::chrono_literals;
225225
226226 const auto mapper = [](size_t num_workers, size_t num_data, bool group){
227- tf::Taskflow tf (num_workers);
227+ tf::Taskflow tf (static_cast < unsigned >( num_workers) );
228228 std::vector<int > vec (num_data, 0 );
229229 tf.parallel_for (vec, [] (int & v) { v = 64 ; }, group ? ::rand () : 0 );
230230 for (const auto v : vec) {
@@ -237,7 +237,7 @@ TEST_CASE("Taskflow.ParallelFor" * doctest::timeout(5)) {
237237 };
238238
239239 const auto reducer = [](size_t num_workers, size_t num_data, bool group){
240- tf::Taskflow tf (num_workers);
240+ tf::Taskflow tf (static_cast < unsigned >( num_workers) );
241241 std::vector<int > vec (num_data, 0 );
242242 std::atomic<int > sum (0 );
243243 tf.parallel_for (vec, [&](auto ) { ++sum; }, group ? ::rand () : 0 );
@@ -273,7 +273,7 @@ TEST_CASE("Taskflow.ParallelFor" * doctest::timeout(5)) {
273273TEST_CASE (" Taskflow.Reduce" * doctest::timeout (5 )) {
274274
275275 const auto plus_test = [](const size_t num_workers, auto &&data){
276- tf::Taskflow tf (num_workers);
276+ tf::Taskflow tf (static_cast < unsigned >( num_workers) );
277277 int result {0 };
278278 std::iota (data.begin (), data.end (), 1 );
279279 tf.reduce (data.begin (), data.end (), result, std::plus<int >());
@@ -282,7 +282,7 @@ TEST_CASE("Taskflow.Reduce" * doctest::timeout(5)) {
282282 };
283283
284284 const auto multiply_test = [](const size_t num_workers, auto &&data){
285- tf::Taskflow tf (num_workers);
285+ tf::Taskflow tf (static_cast < unsigned >( num_workers) );
286286 std::fill (data.begin (), data.end (), 1.0 );
287287 double result {2.0 };
288288 tf.reduce (data.begin (), data.end (), result, std::multiplies<double >());
@@ -291,7 +291,7 @@ TEST_CASE("Taskflow.Reduce" * doctest::timeout(5)) {
291291 };
292292
293293 const auto max_test = [](const size_t num_workers, auto &&data){
294- tf::Taskflow tf (num_workers);
294+ tf::Taskflow tf (static_cast < unsigned >( num_workers) );
295295 std::iota (data.begin (), data.end (), 1 );
296296 int result {0 };
297297 auto lambda = [](const auto & l, const auto & r){return std::max (l, r);};
@@ -301,7 +301,7 @@ TEST_CASE("Taskflow.Reduce" * doctest::timeout(5)) {
301301 };
302302
303303 const auto min_test = [](const size_t num_workers, auto &&data){
304- tf::Taskflow tf (num_workers);
304+ tf::Taskflow tf (static_cast < unsigned >( num_workers) );
305305 std::iota (data.begin (), data.end (), 1 );
306306 int result {std::numeric_limits<int >::max ()};
307307 auto lambda = [](const auto & l, const auto & r){return std::min (l, r);};
0 commit comments