[ODE] Ideas for threading ODE...

Jon Watte (ODE) hplus-ode at mindcontrol.org
Fri Aug 19 11:21:18 MST 2005


> Using OpenMP (http://www.openmp.org) would make it easy to add support
> for multiple threads.  OpenMP is great for data parallelism, which I

I think OpenMP is not the right solution for PC architectures and game 
algorithms.

You could multi-thread ODE by putting the entire stepper in a different 
thread, and have the application do other useful work in the meanwhile. 
You can provide double-buffering or snapshotting of body state 
(position/orientation) to make it easy to do rendering in the 
non-physics thread.

The collision callbacks have to be carefully structured to not interlock 
with the main world update and AI, but that's a reasonable restriction.

Any finer-grain threading than that is unlikely to lead to performance 
gains for PC games. In fact, may lead to lower performance.

Cheers,

                  / h+



More information about the ODE mailing list