Bullet Collision Detection & Physics Library
Classes | Macros | Functions | Variables
btThreads.h File Reference
#include "btScalar.h"
Include dependency graph for btThreads.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  btSpinMutex
 btSpinMutex – lightweight spin-mutex implemented with atomic ops, never puts a thread to sleep because it is designed to be used with a task scheduler which has one thread per core and the threads don't sleep until they run out of tasks. More...
 
class  btIParallelForBody
 
class  btIParallelSumBody
 
class  btITaskScheduler
 

Macros

#define BT_OVERRIDE
 

Functions

bool btIsMainThread ()
 
bool btThreadsAreRunning ()
 
unsigned int btGetCurrentThreadIndex ()
 
void btResetThreadIndexCounter ()
 
void btMutexLock (btSpinMutex *mutex)
 
void btMutexUnlock (btSpinMutex *mutex)
 
bool btMutexTryLock (btSpinMutex *mutex)
 
void btSetTaskScheduler (btITaskScheduler *ts)
 
btITaskSchedulerbtGetTaskScheduler ()
 
btITaskSchedulerbtGetSequentialTaskScheduler ()
 
btITaskSchedulerbtCreateDefaultTaskScheduler ()
 
btITaskSchedulerbtGetOpenMPTaskScheduler ()
 
btITaskSchedulerbtGetTBBTaskScheduler ()
 
btITaskSchedulerbtGetPPLTaskScheduler ()
 
void btParallelFor (int iBegin, int iEnd, int grainSize, const btIParallelForBody &body)
 
btScalar btParallelSum (int iBegin, int iEnd, int grainSize, const btIParallelSumBody &body)
 

Variables

const unsigned int BT_MAX_THREAD_COUNT = 64
 

Macro Definition Documentation

◆ BT_OVERRIDE

#define BT_OVERRIDE

Definition at line 26 of file btThreads.h.

Function Documentation

◆ btCreateDefaultTaskScheduler()

btITaskScheduler * btCreateDefaultTaskScheduler ( )

Definition at line 787 of file btTaskScheduler.cpp.

◆ btGetCurrentThreadIndex()

unsigned int btGetCurrentThreadIndex ( )

Definition at line 290 of file btThreads.cpp.

◆ btGetOpenMPTaskScheduler()

btITaskScheduler * btGetOpenMPTaskScheduler ( )

Definition at line 762 of file btThreads.cpp.

◆ btGetPPLTaskScheduler()

btITaskScheduler * btGetPPLTaskScheduler ( )

Definition at line 784 of file btThreads.cpp.

◆ btGetSequentialTaskScheduler()

btITaskScheduler * btGetSequentialTaskScheduler ( )

Definition at line 755 of file btThreads.cpp.

◆ btGetTaskScheduler()

btITaskScheduler * btGetTaskScheduler ( )

Definition at line 407 of file btThreads.cpp.

◆ btGetTBBTaskScheduler()

btITaskScheduler * btGetTBBTaskScheduler ( )

Definition at line 773 of file btThreads.cpp.

◆ btIsMainThread()

bool btIsMainThread ( )

Definition at line 324 of file btThreads.cpp.

◆ btMutexLock()

void btMutexLock ( btSpinMutex mutex)
inline

Definition at line 70 of file btThreads.h.

◆ btMutexTryLock()

bool btMutexTryLock ( btSpinMutex mutex)
inline

Definition at line 88 of file btThreads.h.

◆ btMutexUnlock()

void btMutexUnlock ( btSpinMutex mutex)
inline

Definition at line 79 of file btThreads.h.

◆ btParallelFor()

void btParallelFor ( int  iBegin,
int  iEnd,
int  grainSize,
const btIParallelForBody body 
)

Definition at line 412 of file btThreads.cpp.

◆ btParallelSum()

btScalar btParallelSum ( int  iBegin,
int  iEnd,
int  grainSize,
const btIParallelSumBody body 
)

Definition at line 439 of file btThreads.cpp.

◆ btResetThreadIndexCounter()

void btResetThreadIndexCounter ( )

Definition at line 329 of file btThreads.cpp.

◆ btSetTaskScheduler()

void btSetTaskScheduler ( btITaskScheduler ts)

Definition at line 386 of file btThreads.cpp.

◆ btThreadsAreRunning()

bool btThreadsAreRunning ( )

Definition at line 381 of file btThreads.cpp.

Variable Documentation

◆ BT_MAX_THREAD_COUNT

const unsigned int BT_MAX_THREAD_COUNT = 64

Definition at line 31 of file btThreads.h.