From Newton Wiki
Jump to: navigation, search


void NewtonSetParallelSolverOnLargeIsland (const NewtonWorld* const newtonWorld, int mode)


Enable/disable multi-threaded constraint resolution for large islands


  • const NewtonWorld* const newtonWorld - pointer to the Newton world.
  • int mode the new setting for multithreading on single collision islands:
            0 = disabled
            1 = enabled


  • (Procedure)


Enables or disables multithreading for single collision islands.

Newton groups collision primitives into so called collision islands to increase the efficiency of the broadphase collision detection. These collision islands represent disjunct sets of possibly colliding objects.

By default multithreading is not enabled for single collision islands but only for separate islands. Using this function one can alter this default behavior of Newton.

  • (disabled by default).
  • Multi threaded mode is not always faster. Among the reasons are
  • 1 - Significant software cost to set up threads, as well as instruction overhead.
  • 2 - Different systems have different cost for running separate threads in a shared memory environment.
  • 3 - Parallel algorithms often have decreased converge rate. This can be as high as half of the of the sequential version. Consequently, the parallel solver requires a higher number of interactions to achieve similar convergence.
  • It is recommended this option is enabled on system with more than two cores, since the performance gain in a dual core system are marginally better. Your mileage may vary.
  • At the very least the application must test the option to verify the performance gains.
  • This option has no impact on other subsystems of the engine.

See also

NewtonGetThreadsCount NewtonSetThreadsCount NewtonGetMultiThreadSolverOnSingleIsland