Classes | Public Member Functions | Private Attributes

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]

List of all members.

Classes

struct  btSpuStatus
struct  SequentialThreadConstructionInfo

Public Member Functions

 SequentialThreadSupport (SequentialThreadConstructionInfo &threadConstructionInfo)
virtual ~SequentialThreadSupport ()
 cleanup/shutdown Libspe2
void startThreads (SequentialThreadConstructionInfo &threadInfo)
virtual void sendRequest (uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1)
 send messages to SPUs
virtual void waitForResponse (unsigned int *puiArgument0, unsigned int *puiArgument1)
 check for messages from SPUs
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)
virtual void stopSPU ()
 tell the task scheduler we are done with the SPU tasks
virtual void setNumTasks (int numTasks)
 tell the task scheduler to use no more than numTasks tasks
virtual int getNumTasks () const
virtual btBarriercreateBarrier ()
virtual btCriticalSectioncreateCriticalSection ()
virtual void deleteBarrier (btBarrier *barrier)
virtual void deleteCriticalSection (btCriticalSection *criticalSection)

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 [inline, virtual]

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

Definition at line 49 of file SequentialThreadSupport.h.

Definition at line 50 of file SequentialThreadSupport.h.


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