]> OCCT Git - occt.git/commit
0033117: migration to intel oneTBB 2021.5.0 (c++20 ready) IR-2022-09-23
authorddzama <ddzama@opencascade.com>
Thu, 15 Sep 2022 06:40:48 +0000 (09:40 +0300)
committersmoskvin <smoskvin@opencascade.com>
Sat, 24 Sep 2022 22:09:12 +0000 (01:09 +0300)
commitb3284f3ba911e4d18477ff1788ace3d7201a8827
tree0ed1781cac35497cb6a6a50b61aeded2b32da204
parentb95eefe1c2879453d2011ac7df247aa3f453167c
0033117: migration to intel oneTBB 2021.5.0 (c++20 ready)

MSVC 2022/c++20.

After employed c++20 language standard errors of compilation in intel oneTBB occurred.
To get rid of compilation errors proposed moving on actual (2021.5.0) intel oneTBB occ products and occt.

After migration errors of compilation of TKernel and TMath have been occurred...
...Error occurred if using c++20 standard with new oneTBB 2021.5.0.
The error was:
   Error C2672 'tbb::v1::parallel_for_each': no matching overloaded function found TKernel
   could be 'void tbb::detail::d2::parallel_for_each(Iterator,Iterator,const Body &)' TKernel
   'tbb::detail::d2::parallel_for_each': the associated constraints are not satisfied TKernel
Note, that if we use c++14 or c++17, all ok, error does not occures.
To solve the problem, i have to modify `UniversalIterator` class:
`value_type` instead `UniversalIterator` converted to `IteratorInterface*`
`pointer` = `reference` = `value_type`
Method `DownCast` moved into `FunctorInterface` abstract class.
argument `UniversalIterator& item` of the unary fuctions converted to `IteratorInterface*`.
The proposed solution removes compilation error.

Affected projects: TKernel, TMath
Affected sources: src/OSD/OSD_Parallel.hxx, src/OSD/OSD_Parallel_Threads.cxx
Affected classes: class OSD_Parallel, OSD_Parallel::UniversalIterator, OSD_Parallel::FunctorInterface, OSD_Parallel::FunctorWrapperIter, OSD_Parallel:;FunctorWrapperInt.
adm/cmake/tbb.cmake
adm/genconfdeps.tcl
dox/build/build_3rdparty/building_3rdparty.md
dox/introduction/introduction.md
src/OSD/OSD_Parallel.hxx
src/OSD/OSD_Parallel_Threads.cxx