Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ > Class Template Reference

#include <threadpoolheap.h>

List of all members.

Public Types

enum  { MaxThreads = NumThreads }
enum  { NumThreadsMask = NumThreads - 1 }
enum  { NumHeapsMask = NumHeaps - 1 }
enum  { MaxHeaps = NumHeaps }
typedef PerThreadHeap_ PerThreadHeap

Public Member Functions

 ThreadPoolHeap (void)
PerThreadHeapgetHeap (void)
void * malloc (size_t sz)
void free (void *ptr)
void clear (void)
size_t getSize (void *ptr)
void setTidMap (int index, int value)
int getTidMap (int index) const
void setInusemap (int index, int value)
int getInusemap (int index) const

Public Attributes

HL::sassert<((NumHeaps
&NumHeapsMask)==0)> 
verifyPowerOfTwoHeaps
HL::sassert<((NumThreads
&NumThreadsMask)==0)> 
verifyPowerOfTwoThreads

Private Attributes

Array< MaxThreads, int > _tidMap
 Which heap is assigned to which thread, indexed by thread.
Array< MaxHeaps, int > _inUseMap
 Which heap is in use (a reference count).
Array< MaxHeaps, PerThreadHeap_heap
 The array of heaps we choose from.

template<int NumThreads, int NumHeaps, class PerThreadHeap_>
class Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >


Member Typedef Documentation

template<int NumThreads, int NumHeaps, class PerThreadHeap_>
typedef PerThreadHeap_ Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::PerThreadHeap

Member Enumeration Documentation

template<int NumThreads, int NumHeaps, class PerThreadHeap_>
anonymous enum
Enumerator:
MaxThreads 
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
anonymous enum
Enumerator:
NumThreadsMask 
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
anonymous enum
Enumerator:
NumHeapsMask 
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
anonymous enum
Enumerator:
MaxHeaps 

Constructor & Destructor Documentation

template<int NumThreads, int NumHeaps, class PerThreadHeap_>
Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::ThreadPoolHeap ( void   )  [inline]

Member Function Documentation

template<int NumThreads, int NumHeaps, class PerThreadHeap_>
void Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::clear ( void   )  [inline]
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
void Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::free ( void *  ptr  )  [inline]
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
PerThreadHeap& Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::getHeap ( void   )  [inline]
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
int Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::getInusemap ( int  index  )  const [inline]
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
size_t Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::getSize ( void *  ptr  )  [inline]
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
int Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::getTidMap ( int  index  )  const [inline]
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
void* Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::malloc ( size_t  sz  )  [inline]
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
void Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::setInusemap ( int  index,
int  value 
) [inline]
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
void Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::setTidMap ( int  index,
int  value 
) [inline]

Member Data Documentation

template<int NumThreads, int NumHeaps, class PerThreadHeap_>
Array<MaxHeaps, PerThreadHeap> Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::_heap [private]

The array of heaps we choose from.

template<int NumThreads, int NumHeaps, class PerThreadHeap_>
Array<MaxHeaps, int> Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::_inUseMap [private]

Which heap is in use (a reference count).

template<int NumThreads, int NumHeaps, class PerThreadHeap_>
Array<MaxThreads, int> Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::_tidMap [private]

Which heap is assigned to which thread, indexed by thread.

template<int NumThreads, int NumHeaps, class PerThreadHeap_>
HL::sassert<((NumHeaps & NumHeapsMask) == 0)> Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::verifyPowerOfTwoHeaps
template<int NumThreads, int NumHeaps, class PerThreadHeap_>
HL::sassert<((NumThreads & NumThreadsMask) == 0)> Hoard::ThreadPoolHeap< NumThreads, NumHeaps, PerThreadHeap_ >::verifyPowerOfTwoThreads

The documentation for this class was generated from the following file:
Generated on Tue Aug 2 11:51:31 2011 for Galois by  doxygen 1.6.3