MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / setNumThreads

Function setNumThreads

examples/MultiThreadedDemo/CommonRigidBodyMTBase.cpp:427–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427static void setNumThreads(int numThreads)
428{
429#if BT_THREADSAFE
430 int newNumThreads = (std::min)(numThreads, int(BT_MAX_THREAD_COUNT));
431 int oldNumThreads = btGetTaskScheduler()->getNumThreads();
432 // only call when the thread count is different
433 if (newNumThreads != oldNumThreads)
434 {
435 btGetTaskScheduler()->setNumThreads(newNumThreads);
436 }
437#endif // #if BT_THREADSAFE
438}
439
440void setTaskSchedulerComboBoxCallback(int combobox, const char* item, void* userPointer)
441{

Callers 2

initMethod · 0.85
setThreadCountCallbackFunction · 0.85

Calls 3

btGetTaskSchedulerFunction · 0.85
getNumThreadsMethod · 0.45
setNumThreadsMethod · 0.45

Tested by

no test coverage detected