I just put up a new version of CPU multithreading for Bullet 2
on github. This verison is based on the latest version of Bullet 2.83 on github.
Changes compared to previous:
- The Multithreaded Demo is now built into the example browser (its under "experimental").
- Microsoft PPL support added (only available for MSVC 2010 or later)
- Demo now allows switching between OpenMP, TBB, PPL and single-threaded at runtime
- Built-in bullet profiling doesn't need to be disabled, it has been fixed so that it only gathers timings from the main thread
- Added CMake options to enable OpenMP and PPL support
- Demo code is cleaned up quite a bit.
In the new demo, there are around 11000 boxes in various piles, and they have had sleeping disabled. If you run the demo long enough some of the stacks of boxes will fall down, but they should stay standing long enough to use the profile viewer and switch between the different threading options to get an idea of how performance is affected.
In order to build the demo, in Cmake make sure to enable BULLET2_USE_THREAD_LOCKS and also BUILD_BULLET2_DEMOS. Then do a "configure" and 3 new options should appear for the multithreaded demo in 3 flavors: OpenMP, TBB, and PPL. Select your desired flavors. For TBB you'll need to install it separately, and then point Cmake to the include and lib directories.
OpenMP should be available on recent versions of GCC, Clang and MSVC.