19 #ifdef USE_WIN32_THREADING //platform specific defines are defined in PlatformDefinitions.h
21 #ifndef BT_WIN32_THREAD_SUPPORT_H
22 #define BT_WIN32_THREAD_SUPPORT_H
30 typedef void* (*Win32lsMemorySetupFunc)();
73 int threadStackSize=65535
106 virtual void waitForResponse(
unsigned int *puiArgument0,
unsigned int *puiArgument1);
108 virtual bool isTaskCompleted(
unsigned int *puiArgument0,
unsigned int *puiArgument1,
int timeOutInMilliseconds);
139 #endif //BT_WIN32_THREAD_SUPPORT_H
141 #endif //USE_WIN32_THREADING
virtual void startSPU()
start the spus (can be called at the beginning of each frame, to make sure that the right SPU program...
virtual btCriticalSection * createCriticalSection()
void * m_eventStartHandle
Win32ThreadFunc m_userThreadFunc
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
const char * m_uniqueName
void *(* Win32lsMemorySetupFunc)()
virtual bool isTaskCompleted(unsigned int *puiArgument0, unsigned int *puiArgument1, int timeOutInMilliseconds)
check for messages from SPUs
void * m_eventCompletetHandle
void startThreads(const Win32ThreadConstructionInfo &threadInfo)
Win32ThreadSupport(const Win32ThreadConstructionInfo &threadConstructionInfo)
The number of threads should be equal to the number of available cores.
virtual void stopSPU()
tell the task scheduler we are done with the SPU tasks
virtual void deleteBarrier(btBarrier *barrier)
Win32ThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication...
placeholder, until libspe2 support is there
virtual void * getThreadLocalMemory(int taskId)
Setup and initialize SPU/CELL/Libspe2.
Win32ThreadFunc m_userThreadFunc
virtual void setNumTasks(int numTasks)
tell the task scheduler to use no more than numTasks tasks
virtual void waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1)
check for messages from SPUs
btAlignedObjectArray< btSpuStatus > m_activeSpuStatus
virtual ~Win32ThreadSupport()
cleanup/shutdown Libspe2
virtual btBarrier * createBarrier()
Win32lsMemorySetupFunc m_lsMemoryFunc
btAlignedObjectArray< void * > m_completeHandles
char m_eventStartHandleName[32]
char m_eventCompletetHandleName[32]
void(* Win32ThreadFunc)(void *userPtr, void *lsMemory)
Win32ThreadConstructionInfo(const char *uniqueName, Win32ThreadFunc userThreadFunc, Win32lsMemorySetupFunc lsMemoryFunc, int numThreads=1, int threadStackSize=65535)
static void barrier(unsigned int a)
virtual void sendRequest(uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1)
send messages to SPUs
virtual int getNumTasks() const
virtual void deleteCriticalSection(btCriticalSection *criticalSection)