abdullah wrote: NormandC wrote:
Actually we are. It's included in the opencascade-misc package.
I totally missed that one when installing!!
I might have found a slight problem with OCC packaging or how we use it in FC.
While the configuration files are there, they do not seem to be used.
Now, the include files contain TBB in these files:
Code: Select all
grep TBB /usr/include/opencascade/*
/usr/include/opencascade/BVH_DistanceField.lxx:#ifdef HAVE_TBB
/usr/include/opencascade/BVH_DistanceField.lxx:#ifdef HAVE_TBB
/usr/include/opencascade/BVH_DistanceField.lxx://! Tool object for parallel construction of distance field (uses Intel TBB).
/usr/include/opencascade/BVH_DistanceField.lxx:#ifdef HAVE_TBB
/usr/include/opencascade/BVH_LinearBuilder.lxx:#ifdef HAVE_TBB
/usr/include/opencascade/BVH_LinearBuilder.lxx: //! TBB task for parallel bounds updating.
/usr/include/opencascade/BVH_LinearBuilder.lxx: //! Creates new TBB parallel bound update task.
/usr/include/opencascade/BVH_LinearBuilder.lxx:#ifdef HAVE_TBB
/usr/include/opencascade/BVH_LinearBuilder.lxx: // Note: Although TBB tasks are allocated using placement
/usr/include/opencascade/BVH_RadixSorter.lxx:#ifdef HAVE_TBB
/usr/include/opencascade/BVH_RadixSorter.lxx: //! TBB functor class to run sorting.
/usr/include/opencascade/BVH_RadixSorter.lxx:#ifdef HAVE_TBB
/usr/include/opencascade/OSD_Parallel.hxx:#ifdef HAVE_TBB
/usr/include/opencascade/OSD_Parallel.hxx://! Moreover the primitives may be a wrapper for some primitives from 3rd-party library - TBB.
/usr/include/opencascade/OSD_Parallel.hxx://! To use it is necessary to implement TBB like interface which is based on functors.
/usr/include/opencascade/OSD_Parallel.hxx: #ifdef HAVE_TBB
/usr/include/opencascade/OSD_Parallel.hxx: #ifdef HAVE_TBB
/usr/include/opencascade/Standard_MMgrTBBalloc.hxx:#ifndef _Standard_MMgrTBBalloc_HeaderFile
/usr/include/opencascade/Standard_MMgrTBBalloc.hxx:#define _Standard_MMgrTBBalloc_HeaderFile
/usr/include/opencascade/Standard_MMgrTBBalloc.hxx://! Implementation of OCC memory manager which uses Intel TBB
/usr/include/opencascade/Standard_MMgrTBBalloc.hxx://! On configurations where TBB is not available standard RTL functions
/usr/include/opencascade/Standard_MMgrTBBalloc.hxx:class Standard_MMgrTBBalloc : public Standard_MMgrRoot
/usr/include/opencascade/Standard_MMgrTBBalloc.hxx: Standard_EXPORT Standard_MMgrTBBalloc(const Standard_Boolean aClear=Standard_False);
As you can see there is lots of HAVE_TBB conditional compilation. However none defines HAVE_TBB.
Now, in /usr/lib/cmake/opencascade, there are these definitions:
Code: Select all
OpenCASCADECompileDefinitionsAndFlags-release.cmake:set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Release>:HAVE_TBB>)
OpenCASCADEConfig.cmake:set (OpenCASCADE_WITH_TBB on)
Now, HAVE_TBB is not defined when I compile (I tried). This should mean that when those opencascade headers are included in FC, the HAVE_TBB blocks are not being used (but the code WITHOUT the HAVE_TBB). This apparently means that we are linking to a library produced with the HAVE_TBB "ON" (defined), but using the HAVE_TBB "OFF" (undefined) headers. Potentially I would say there may be unresolved symbols (in the future).
I am not expert at all in this cmake topic. I have invested a couple of days into trying to show the TBB support in the about FC window without success. I have just not come with a right combination of cmake statements that would "import" the Opencascade configuration/compile definitions and let me access to the HAVE_TBB (or other macro) in FC's code.
I just wanted to let you know. Maybe I am just wrong. Better safe than sorry