]> git.pld-linux.org Git - packages/OpenCASCADE.git/blob - OpenCASCADE-tbb.patch
tbb rebuild
[packages/OpenCASCADE.git] / OpenCASCADE-tbb.patch
1 diff -u -r opencascade-7.5.0.orig/src/OSD/OSD_Parallel_TBB.cxx opencascade-7.5.0/src/OSD/OSD_Parallel_TBB.cxx
2 --- opencascade-7.5.0.orig/src/OSD/OSD_Parallel_TBB.cxx 2020-11-03 15:50:04.000000000 +0100
3 +++ opencascade-7.5.0/src/OSD/OSD_Parallel_TBB.cxx      2021-12-20 15:02:25.028915774 +0100
4 @@ -25,7 +25,7 @@
5  #include <tbb/parallel_for.h>
6  #include <tbb/parallel_for_each.h>
7  #include <tbb/blocked_range.h>
8 -#include <tbb/task_scheduler_init.h>
9 +#include <tbb/global_control.h>
10  Standard_ENABLE_DEPRECATION_WARNINGS
11  
12  //=======================================================================
13 @@ -38,19 +38,12 @@
14                                      const FunctorInterface& theFunctor,
15                                      Standard_Integer theNbItems)
16  {
17 -  try
18 -  {
19      const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool();
20      const Standard_Integer aNbThreads = theNbItems > 0 ?
21        aThreadPool->NbDefaultThreadsToLaunch() : -1;
22  
23 -    tbb::task_scheduler_init aScheduler (aNbThreads);
24 +    tbb::global_control(tbb::global_control::max_allowed_parallelism, aNbThreads);
25      tbb::parallel_for_each (theBegin, theEnd, theFunctor);
26 -  }
27 -  catch (tbb::captured_exception& anException)
28 -  {
29 -    throw Standard_ProgramError (anException.what());
30 -  }
31  }
32  
33  #endif /* HAVE_TBB */
This page took 0.053818 seconds and 3 git commands to generate.