diff --git a/library/tests/dtest.cpp b/library/tests/dtest.cpp index 1116fb1f..d26abdfa 100644 --- a/library/tests/dtest.cpp +++ b/library/tests/dtest.cpp @@ -28,7 +28,7 @@ int main(int argc, char * argv[]) { read_args(argc, argv); - SetResources(options.memory_mb_, options.num_threads_); + SetResources(options.memory_mb_, 0); DDSInfo info; GetDDSInfo(&info); diff --git a/library/tests/itest.cpp b/library/tests/itest.cpp index 8e63b9ec..2eb6bbd2 100644 --- a/library/tests/itest.cpp +++ b/library/tests/itest.cpp @@ -28,7 +28,7 @@ int main(int argc, char * argv[]) { read_args(argc, argv); - SetResources(options.memory_mb_, options.num_threads_); + SetResources(options.memory_mb_, 0); DDSInfo info; GetDDSInfo(&info); diff --git a/library/tests/loop.cpp b/library/tests/loop.cpp index 8c564e03..7dbeb6a8 100644 --- a/library/tests/loop.cpp +++ b/library/tests/loop.cpp @@ -118,8 +118,8 @@ bool loop_calc( setw(25) << right << "Time" << "\n"; #endif - int filter[5] = {0, 0, 0, 0, 0}; - + int filter[DDS_STRAINS] = {0, 0, 0, 0, 0}; + const int strain_count = DDS_STRAINS; for (int i = 0; i < number; i += stepsize) { int count = (i + stepsize > number ? number - i : stepsize); @@ -128,7 +128,9 @@ bool loop_calc( strcpy(dealsp->deals[j].cards, deal_list[i+j].remainCards); timer.start(count); - const int ret = CalcAllTablesPBN(dealsp, -1, filter, resp, parp); + const int workload = count * strain_count; + const int threads = dtest_effective_threads(options.num_threads_, workload); + const int ret = CalcAllTablesPBNN(dealsp, -1, filter, resp, parp, threads); if (ret != RETURN_NO_FAULT) { cout << "loop_calc: i " << i << ", return " << ret << "\n";