Bullet Collision Detection & Physics Library
Classes | Public Member Functions | Private Attributes | List of all members
SequentialThreadSupport Class Reference

The SequentialThreadSupport is a portable non-parallel implementation of the btThreadSupportInterface This is useful for debugging and porting SPU Tasks to other platforms. More...

#include <SequentialThreadSupport.h>

Inheritance diagram for SequentialThreadSupport:
Inheritance graph
[legend]
Collaboration diagram for SequentialThreadSupport:
Collaboration graph
[legend]

Classes

struct  btSpuStatus
 
struct  SequentialThreadConstructionInfo
 

Public Member Functions

 SequentialThreadSupport (SequentialThreadConstructionInfo &threadConstructionInfo)
 
virtual ~SequentialThreadSupport ()
 cleanup/shutdown Libspe2 More...
 
void startThreads (SequentialThreadConstructionInfo &threadInfo)
 
virtual void sendRequest (uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1)
 send messages to SPUs More...
 
virtual void waitForResponse (unsigned int *puiArgument0, unsigned int *puiArgument1)
 check for messages from SPUs More...
 
virtual void startSPU ()
 start the spus (can be called at the beginning of each frame, to make sure that the right SPU program is loaded) More...
 
virtual void stopSPU ()
 tell the task scheduler we are done with the SPU tasks More...
 
virtual void setNumTasks (int numTasks)
 tell the task scheduler to use no more than numTasks tasks More...
 
virtual int getNumTasks () const
 
virtual btBarriercreateBarrier ()
 
virtual btCriticalSectioncreateCriticalSection ()
 
virtual void deleteBarrier (btBarrier *barrier)
 
virtual void deleteCriticalSection (btCriticalSection *criticalSection)
 
- Public Member Functions inherited from btThreadSupportInterface
virtual ~btThreadSupportInterface ()
 
virtual void * getThreadLocalMemory (int taskId)
 

Private Attributes

btAlignedObjectArray< btSpuStatusm_activeSpuStatus
 
btAlignedObjectArray< void * > m_completeHandles
 

Detailed Description

The SequentialThreadSupport is a portable non-parallel implementation of the btThreadSupportInterface This is useful for debugging and porting SPU Tasks to other platforms.

Definition at line 34 of file SequentialThreadSupport.h.

Constructor & Destructor Documentation

SequentialThreadSupport::SequentialThreadSupport ( SequentialThreadConstructionInfo threadConstructionInfo)

Definition at line 22 of file SequentialThreadSupport.cpp.

SequentialThreadSupport::~SequentialThreadSupport ( )
virtual

cleanup/shutdown Libspe2

Definition at line 28 of file SequentialThreadSupport.cpp.

Member Function Documentation

btBarrier * SequentialThreadSupport::createBarrier ( )
virtual

Implements btThreadSupportInterface.

Definition at line 157 of file SequentialThreadSupport.cpp.

btCriticalSection * SequentialThreadSupport::createCriticalSection ( )
virtual

Implements btThreadSupportInterface.

Definition at line 162 of file SequentialThreadSupport.cpp.

void SequentialThreadSupport::deleteBarrier ( btBarrier barrier)
virtual

Implements btThreadSupportInterface.

Definition at line 168 of file SequentialThreadSupport.cpp.

void SequentialThreadSupport::deleteCriticalSection ( btCriticalSection criticalSection)
virtual

Implements btThreadSupportInterface.

Definition at line 173 of file SequentialThreadSupport.cpp.

virtual int SequentialThreadSupport::getNumTasks ( ) const
inlinevirtual

Implements btThreadSupportInterface.

Definition at line 84 of file SequentialThreadSupport.h.

void SequentialThreadSupport::sendRequest ( uint32_t  uiCommand,
ppu_address_t  uiArgument0,
uint32_t  uiArgument1 
)
virtual

send messages to SPUs

not implemented

Implements btThreadSupportInterface.

Definition at line 36 of file SequentialThreadSupport.cpp.

void SequentialThreadSupport::setNumTasks ( int  numTasks)
virtual

tell the task scheduler to use no more than numTasks tasks

Implements btThreadSupportInterface.

Definition at line 90 of file SequentialThreadSupport.cpp.

void SequentialThreadSupport::startSPU ( )
virtual

start the spus (can be called at the beginning of each frame, to make sure that the right SPU program is loaded)

Implements btThreadSupportInterface.

Definition at line 81 of file SequentialThreadSupport.cpp.

void SequentialThreadSupport::startThreads ( SequentialThreadConstructionInfo threadInfo)

Definition at line 67 of file SequentialThreadSupport.cpp.

void SequentialThreadSupport::stopSPU ( )
virtual

tell the task scheduler we are done with the SPU tasks

Implements btThreadSupportInterface.

Definition at line 85 of file SequentialThreadSupport.cpp.

void SequentialThreadSupport::waitForResponse ( unsigned int *  puiArgument0,
unsigned int *  puiArgument1 
)
virtual

check for messages from SPUs

Implements btThreadSupportInterface.

Definition at line 59 of file SequentialThreadSupport.cpp.

Member Data Documentation

btAlignedObjectArray<btSpuStatus> SequentialThreadSupport::m_activeSpuStatus
private

Definition at line 49 of file SequentialThreadSupport.h.

btAlignedObjectArray<void*> SequentialThreadSupport::m_completeHandles
private

Definition at line 50 of file SequentialThreadSupport.h.


The documentation for this class was generated from the following files: