PosixThreadSupport Class Reference

#include <PosixThreadSupport.h>

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

List of all members.

Classes

struct  btSpuStatus
struct  ThreadConstructionInfo
 Setup and initialize SPU/CELL/Libspe2. More...

Public Types

enum  sStatus {
  STATUS_BUSY,
  STATUS_READY,
  STATUS_FINISHED
}
typedef enum
PosixThreadSupport::sStatus 
Status

Public Member Functions

 PosixThreadSupport (ThreadConstructionInfo &threadConstructionInfo)
virtual ~PosixThreadSupport ()
 cleanup/shutdown Libspe2
void startThreads (ThreadConstructionInfo &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

Private Attributes

btAlignedObjectArray< btSpuStatusm_activeSpuStatus

Detailed Description

Definition at line 36 of file PosixThreadSupport.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
STATUS_BUSY 
STATUS_READY 
STATUS_FINISHED 

Definition at line 39 of file PosixThreadSupport.h.


Constructor & Destructor Documentation

PosixThreadSupport::PosixThreadSupport ( ThreadConstructionInfo threadConstructionInfo  ) 

Definition at line 35 of file PosixThreadSupport.cpp.

PosixThreadSupport::~PosixThreadSupport (  )  [virtual]

cleanup/shutdown Libspe2

Definition at line 41 of file PosixThreadSupport.cpp.


Member Function Documentation

virtual int PosixThreadSupport::getNumTasks (  )  const [inline, virtual]

Implements btThreadSupportInterface.

Definition at line 116 of file PosixThreadSupport.h.

void PosixThreadSupport::sendRequest ( uint32_t  uiCommand,
ppu_address_t  uiArgument0,
uint32_t  uiArgument1 
) [virtual]

send messages to SPUs

gMidphaseSPU.sendRequest(CMD_GATHER_AND_PROCESS_PAIRLIST, (uint32_t) &taskDesc);

we should spawn an SPU task here, and in 'waitForResponse' it should wait for response of the (one of) the first tasks that finished

not implemented

Implements btThreadSupportInterface.

Definition at line 123 of file PosixThreadSupport.cpp.

virtual void PosixThreadSupport::setNumTasks ( int  numTasks  )  [inline, virtual]

tell the task scheduler to use no more than numTasks tasks

Implements btThreadSupportInterface.

Definition at line 114 of file PosixThreadSupport.h.

void PosixThreadSupport::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 228 of file PosixThreadSupport.cpp.

void PosixThreadSupport::startThreads ( ThreadConstructionInfo threadInfo  ) 

Definition at line 196 of file PosixThreadSupport.cpp.

void PosixThreadSupport::stopSPU (  )  [virtual]

tell the task scheduler we are done with the SPU tasks

Implements btThreadSupportInterface.

Definition at line 234 of file PosixThreadSupport.cpp.

void PosixThreadSupport::waitForResponse ( unsigned int *  puiArgument0,
unsigned int *  puiArgument1 
) [virtual]

check for messages from SPUs

We should wait for (one of) the first tasks to finish (or other SPU messages), and report its response

A possible response can be 'yes, SPU handled it', or 'no, please do a PPU fallback'

Implements btThreadSupportInterface.

Definition at line 160 of file PosixThreadSupport.cpp.


Member Data Documentation

Definition at line 63 of file PosixThreadSupport.h.


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

Generated on Mon Feb 15 22:25:16 2010 for Bullet Collision Detection & Physics Library by  doxygen 1.6.1