RavEngine
Loading...
Searching...
No Matches
physx::PxcThreadCoherentCache< T, Params > Class Template Reference

#include <PxcThreadCoherentCache.h>

Inheritance diagram for physx::PxcThreadCoherentCache< T, Params >:
[legend]
Collaboration diagram for physx::PxcThreadCoherentCache< T, Params >:
[legend]

Public Types

typedef PxSListEntry EntryBase
 

Public Member Functions

PX_INLINE PxcThreadCoherentCache (Params *params, const Allocator &alloc=Allocator())
 
PX_INLINE T * get ()
 
PX_INLINE void put (T *item)
 
- Public Member Functions inherited from physx::PxAlignedAllocator< 16, PxReflectionAllocator< T > >
 PxAlignedAllocator (const PxReflectionAllocator< T > &base=PxReflectionAllocator< T >())
 
void * allocate (size_t size, const char *file, int line)
 
void deallocate (void *ptr)
 
- Public Member Functions inherited from physx::PxReflectionAllocator< T >
 PxReflectionAllocator (const PxEMPTY)
 
 PxReflectionAllocator (const char *=0)
 
 PxReflectionAllocator (const PxReflectionAllocator &)
 
PX_FORCE_INLINE void * allocate (size_t size, const char *filename, int line)
 
PX_FORCE_INLINE void deallocate (void *ptr)
 

Friends

template<class T2 , class P2 >
class PxcThreadCoherentCacheIterator
 

Detailed Description

template<class T, class Params>
class physx::PxcThreadCoherentCache< T, Params >

Controls a pool of large objects which must be thread safe. Tries to return the object most recently used by the thread(for better cache coherancy). Assumes the object has a default contructor.

(Note the semantics are different to a pool because we dont want to construct/destroy each time an object is requested, which may be expensive).

TODO: add thread coherancy.


The documentation for this class was generated from the following file: