CCLib now depends on Qt (via the QtCore lib).
We have done this in order to integrate the 'QtConcurrent' framework for parallel octree-based computation. The 'executeFunctionForAllCellsAtLevel' and 'executeFunctionForAllCellsAtStartingLevel' methods of the DgmOctree structure have now their equivalent '_MT' (multi-threaded) versions: thanks to the QtConcurrent::map mechanism, octree-cell based computations are automatically dispatched on all available processor cores.
This results in almost linear division of computing time (X2 faster on dual-cores and X3.8 on quad-cores for our first tests). The only constraint is to make sure that the cellular function provided by the user is not doing concurrent reading/writing on the same memory block (while reading/writing different values of the same array is ok).
Note: this feature is automatically disabled in 'debug' mode for the moment (but one can simply force it with the ENABLE_MT_OCTREE macro at the begining of the "DgmOctree.h" file.
Daniel
CCLib goes parallel
CCLib goes parallel
Daniel, CloudCompare admin
Re: CCLib goes parallel
Are there any other macros that have to be enabled/disabled? I would really like this to also work in Debug mode (Release works well).
Enabling ENABLE_MT_OCTREE in the DgmOctree.h doesn't seem to have any impact for me when calling:
GeometricalAnalysisTools::ComputeCharactersitic(...)
Enabling ENABLE_MT_OCTREE in the DgmOctree.h doesn't seem to have any impact for me when calling:
GeometricalAnalysisTools::ComputeCharactersitic(...)
Re: CCLib goes parallel
I would have assumed that enabling this ENABLE_MT_OCTREE macro would be sufficient. But debug mode is so slow I'm not sure parallelism would help that much in terms of performances. Moreover it gets really hard to debug (with breakpoints, etc.) a parallel code.
Daniel, CloudCompare admin