15#define WIN32_LEAN_AND_MEAN
21typedef unsigned long long btU64;
22static const int kCacheLineSize = 64;
89 WorkerThreadStatus::Type m_status;
147#if BT_PARALLEL_SUM_DETERMINISTISM
232 for (
int i = 0; i <
contexts.size(); ++i)
373 localStorage->m_status = WorkerThreadStatus::kWaitingForWork;
393 for (
int i = 0; i < 50; ++i)
511 storage.m_status = WorkerThreadStatus::kSleeping;
609 if (
storage.m_status != WorkerThreadStatus::kSleeping)
617 if (
storage.m_status == WorkerThreadStatus::kSleeping)
#define btAlignedFree(ptr)
#define btAlignedAlloc(size, alignment)
const T & btMax(const T &a, const T &b)
const T & btMin(const T &a, const T &b)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED64(a)
static T sum(const btAlignedObjectArray< T > &items)
btITaskScheduler * btCreateDefaultTaskScheduler()
const unsigned int BT_MAX_THREAD_COUNT
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
The btClock is a portable basic clock that measures accurate time in seconds, use for profiling.
virtual void forLoop(int iBegin, int iEnd) const =0
virtual btScalar sumLoop(int iBegin, int iEnd) const =0
virtual int getNumThreads() const =0
virtual int getMaxNumThreads() const =0
virtual void parallelFor(int iBegin, int iEnd, int grainSize, const btIParallelForBody &body)=0
virtual void sleepWorkerThreadsHint()
virtual void setNumThreads(int numThreads)=0
virtual btScalar parallelSum(int iBegin, int iEnd, int grainSize, const btIParallelSumBody &body)=0
btSpinMutex – lightweight spin-mutex implemented with atomic ops, never puts a thread to sleep becaus...
static btThreadSupportInterface * create(const ConstructionInfo &info)