CCLib goes parallel
Posted: Wed Feb 02, 2011 11:06 pm
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
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