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"
|
#include "BulletMultiThreaded/Win32ThreadSupport.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "BulletMultiThreaded/PlatformDefinitions.h"
|
||||||
|
#ifdef USE_PTHREADS
|
||||||
|
#include "BulletMultiThreaded/PosixThreadSupport.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "BulletMultiThreaded/SequentialThreadSupport.h"
|
#include "BulletMultiThreaded/SequentialThreadSupport.h"
|
||||||
#include "MiniCLTaskScheduler.h"
|
#include "MiniCLTaskScheduler.h"
|
||||||
#include "MiniCLTask/MiniCLTask.h"
|
#include "MiniCLTask/MiniCLTask.h"
|
||||||
@@ -660,10 +666,20 @@ CL_API_ENTRY cl_context CL_API_CALL clCreateContextFromType(cl_context_propertie
|
|||||||
processMiniCLTask, //processCollisionTask,
|
processMiniCLTask, //processCollisionTask,
|
||||||
createMiniCLLocalStoreMemory,//createCollisionLocalStoreMemory,
|
createMiniCLLocalStoreMemory,//createCollisionLocalStoreMemory,
|
||||||
maxNumOutstandingTasks));
|
maxNumOutstandingTasks));
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifdef USE_PTHREADS
|
||||||
|
PosixThreadSupport::ThreadConstructionInfo constructionInfo("PosixThreads",
|
||||||
|
processMiniCLTask,
|
||||||
|
createMiniCLLocalStoreMemory,
|
||||||
|
maxNumOutstandingTasks);
|
||||||
|
threadSupport = new PosixThreadSupport(constructionInfo);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
///todo: add posix thread support for other platforms
|
///todo: add posix thread support for other platforms
|
||||||
SequentialThreadSupport::SequentialThreadConstructionInfo stc("MiniCL",processMiniCLTask,createMiniCLLocalStoreMemory);
|
SequentialThreadSupport::SequentialThreadConstructionInfo stc("MiniCL",processMiniCLTask,createMiniCLLocalStoreMemory);
|
||||||
threadSupport = new SequentialThreadSupport(stc);
|
threadSupport = new SequentialThreadSupport(stc);
|
||||||
|
#endif //USE_PTHREADS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user