@@ -93,6 +93,9 @@ struct umfIpcTest : umf_test::test,
9393 providerParamsDestroy = provider_params_destroy;
9494 memAccessor = accessor;
9595 openedIpcCacheSize = getOpenedIpcCacheSize ();
96+
97+ int ncores = utils_get_num_cores ();
98+ NTHREADS = (ncores > 10 ) ? ncores : 10 ;
9699 }
97100
98101 void TearDown () override { test::TearDown (); }
@@ -162,7 +165,8 @@ struct umfIpcTest : umf_test::test,
162165 closeCount (0 ) {}
163166 };
164167
165- static constexpr int NTHREADS = 10 ;
168+ unsigned int NTHREADS ;
169+ static constexpr int CNTHREADS = 10 ;
166170 stats_type stat;
167171 MemoryAccessor *memAccessor = nullptr ;
168172
@@ -188,7 +192,7 @@ struct umfIpcTest : umf_test::test,
188192 ptrs.push_back (ptr);
189193 }
190194
191- std::array<std::vector<umf_ipc_handle_t >, NTHREADS > ipcHandles;
195+ std::array<std::vector<umf_ipc_handle_t >, CNTHREADS > ipcHandles;
192196
193197 umf_test::syncthreads_barrier syncthreads (NTHREADS );
194198
@@ -302,7 +306,7 @@ struct umfIpcTest : umf_test::test,
302306 ipcHandles.push_back (ipcHandle);
303307 }
304308
305- std::array<std::vector<void *>, NTHREADS > openedIpcHandles;
309+ std::array<std::vector<void *>, CNTHREADS > openedIpcHandles;
306310 umf_ipc_handler_handle_t ipcHandler = nullptr ;
307311 ret = umfPoolGetIPCHandler (pool.get (), &ipcHandler);
308312 ASSERT_EQ (ret, UMF_RESULT_SUCCESS );
0 commit comments