btThreadSupportInterface* createSolverThreadSupport(int maxNumThreads) { #define SEQUENTIAL #ifdef SEQUENTIAL SequentialThreadSupport::SequentialThreadConstructionInfo tci("solverThreads",SolverThreadFunc,SolverlsMemoryFunc); SequentialThreadSupport* threadSupport = new SequentialThreadSupport(tci); threadSupport->startSPU(); #else #ifdef _WIN32 Win32ThreadSupport::Win32ThreadConstructionInfo threadConstructionInfo("solverThreads",SolverThreadFunc,SolverlsMemoryFunc,maxNumThreads); Win32ThreadSupport* threadSupport = new Win32ThreadSupport(threadConstructionInfo); threadSupport->startSPU(); #elif defined (USE_PTHREADS) PosixThreadSupport::ThreadConstructionInfo solverConstructionInfo("solver", SolverThreadFunc, SolverlsMemoryFunc, maxNumThreads); PosixThreadSupport* threadSupport = new PosixThreadSupport(solverConstructionInfo); #else SequentialThreadSupport::SequentialThreadConstructionInfo tci("solverThreads",SolverThreadFunc,SolverlsMemoryFunc); SequentialThreadSupport* threadSupport = new SequentialThreadSupport(tci); threadSupport->startSPU(); #endif #endif return threadSupport; }
//#define SEQUENTIAL btThreadSupportInterface* createSolverThreadSupport(int maxNumThreads) { #ifdef SEQUENTIAL SequentialThreadSupport::SequentialThreadConstructionInfo tci("solverThreads", SolverThreadFunc, SolverlsMemoryFunc); SequentialThreadSupport* threadSupport = new SequentialThreadSupport(tci); threadSupport->startSPU(); #else Win32ThreadSupport::Win32ThreadConstructionInfo threadConstructionInfo("solverThreads", SolverThreadFunc, SolverlsMemoryFunc, maxNumThreads); Win32ThreadSupport* threadSupport = new Win32ThreadSupport(threadConstructionInfo); threadSupport->startSPU(); #endif return threadSupport; }