Bullet Collision Detection & Physics Library
Classes | Macros | Functions | Variables
btThreads.cpp File Reference
#include "btThreads.h"
#include "btQuickprof.h"
#include <algorithm>
Include dependency graph for btThreads.cpp:

Go to the source code of this file.

Classes

struct  ThreadsafeCounter
 
class  btTaskSchedulerSequential
 btTaskSchedulerSequential – non-threaded implementation of task scheduler (really just useful for testing performance of single threaded vs multi) More...
 

Macros

#define THREAD_LOCAL_STATIC   static
 
#define BT_DETECT_BAD_THREAD_INDEX   0
 

Functions

unsigned int btGetCurrentThreadIndex ()
 
bool btIsMainThread ()
 
void btResetThreadIndexCounter ()
 
void btPushThreadsAreRunning ()
 
void btPopThreadsAreRunning ()
 
bool btThreadsAreRunning ()
 
void btSetTaskScheduler (btITaskScheduler *ts)
 
btITaskSchedulerbtGetTaskScheduler ()
 
void btParallelFor (int iBegin, int iEnd, int grainSize, const btIParallelForBody &body)
 
btScalar btParallelSum (int iBegin, int iEnd, int grainSize, const btIParallelSumBody &body)
 
btITaskSchedulerbtGetSequentialTaskScheduler ()
 
btITaskSchedulerbtGetOpenMPTaskScheduler ()
 
btITaskSchedulerbtGetTBBTaskScheduler ()
 
btITaskSchedulerbtGetPPLTaskScheduler ()
 

Variables

static btITaskSchedulergBtTaskScheduler
 
static int gThreadsRunningCounter = 0
 
static btSpinMutex gThreadsRunningCounterMutex
 
static ThreadsafeCounter gThreadCounter
 

Macro Definition Documentation

#define BT_DETECT_BAD_THREAD_INDEX   0

Definition at line 287 of file btThreads.cpp.

#define THREAD_LOCAL_STATIC   static

Definition at line 222 of file btThreads.cpp.

Function Documentation

unsigned int btGetCurrentThreadIndex ( )

Definition at line 304 of file btThreads.cpp.

btITaskScheduler* btGetOpenMPTaskScheduler ( )

Definition at line 786 of file btThreads.cpp.

btITaskScheduler* btGetPPLTaskScheduler ( )

Definition at line 810 of file btThreads.cpp.

btITaskScheduler* btGetSequentialTaskScheduler ( )

Definition at line 778 of file btThreads.cpp.

btITaskScheduler* btGetTaskScheduler ( )

Definition at line 423 of file btThreads.cpp.

btITaskScheduler* btGetTBBTaskScheduler ( )

Definition at line 798 of file btThreads.cpp.

bool btIsMainThread ( )

Definition at line 338 of file btThreads.cpp.

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

Definition at line 429 of file btThreads.cpp.

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

Definition at line 456 of file btThreads.cpp.

void btPopThreadsAreRunning ( )

Definition at line 388 of file btThreads.cpp.

void btPushThreadsAreRunning ( )

Definition at line 381 of file btThreads.cpp.

void btResetThreadIndexCounter ( )

Definition at line 343 of file btThreads.cpp.

void btSetTaskScheduler ( btITaskScheduler ts)

Definition at line 401 of file btThreads.cpp.

bool btThreadsAreRunning ( )

Definition at line 395 of file btThreads.cpp.

Variable Documentation

btITaskScheduler* gBtTaskScheduler
static

Definition at line 256 of file btThreads.cpp.

ThreadsafeCounter gThreadCounter
static

Definition at line 259 of file btThreads.cpp.

int gThreadsRunningCounter = 0
static

Definition at line 257 of file btThreads.cpp.

btSpinMutex gThreadsRunningCounterMutex
static

Definition at line 258 of file btThreads.cpp.