add support for PosixThreadSupport for MiniCL (partial CPU OpenCL replacement)
This commit is contained in:
@@ -21,6 +21,12 @@ subject to the following restrictions:
|
||||
#include "BulletMultiThreaded/Win32ThreadSupport.h"
|
||||
#endif
|
||||
|
||||
#include "BulletMultiThreaded/PlatformDefinitions.h"
|
||||
#ifdef USE_PTHREADS
|
||||
#include "BulletMultiThreaded/PosixThreadSupport.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "BulletMultiThreaded/SequentialThreadSupport.h"
|
||||
#include "MiniCLTaskScheduler.h"
|
||||
#include "MiniCLTask/MiniCLTask.h"
|
||||
@@ -660,10 +666,20 @@ CL_API_ENTRY cl_context CL_API_CALL clCreateContextFromType(cl_context_propertie
|
||||
processMiniCLTask, //processCollisionTask,
|
||||
createMiniCLLocalStoreMemory,//createCollisionLocalStoreMemory,
|
||||
maxNumOutstandingTasks));
|
||||
#else
|
||||
|
||||
#ifdef USE_PTHREADS
|
||||
PosixThreadSupport::ThreadConstructionInfo constructionInfo("PosixThreads",
|
||||
processMiniCLTask,
|
||||
createMiniCLLocalStoreMemory,
|
||||
maxNumOutstandingTasks);
|
||||
threadSupport = new PosixThreadSupport(constructionInfo);
|
||||
|
||||
#else
|
||||
///todo: add posix thread support for other platforms
|
||||
SequentialThreadSupport::SequentialThreadConstructionInfo stc("MiniCL",processMiniCLTask,createMiniCLLocalStoreMemory);
|
||||
threadSupport = new SequentialThreadSupport(stc);
|
||||
#endif //USE_PTHREADS
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user