Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
galois::LargeArray< T > Class Template Reference

Large array of objects with proper specialization for void type and supporting various allocation and construction policies. More...

#include <LargeArray.h>

Classes

struct  size_of
 

Public Types

typedef T raw_value_type
 
typedef T value_type
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef pointer iterator
 
typedef const_pointer const_iterator
 

Public Member Functions

 LargeArray (void *d, size_t s)
 Wraps existing buffer in LargeArray interface. More...
 
 LargeArray ()
 
 LargeArray (LargeArray &&o)
 
LargeArrayoperator= (LargeArray &&o)
 
 LargeArray (const LargeArray &)=delete
 
LargeArrayoperator= (const LargeArray &)=delete
 
 ~LargeArray ()
 
const_reference at (difference_type x) const
 
reference at (difference_type x)
 
const_reference operator[] (size_type x) const
 
reference operator[] (size_type x)
 
void set (difference_type x, const_reference v)
 
size_type size () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void allocateInterleaved (size_type n)
 [allocatefunctions] Allocates interleaved across NUMA (memory) nodes. More...
 
void allocateBlocked (size_type n)
 Allocates using blocked memory policy. More...
 
void allocateLocal (size_type n)
 Allocates using Thread Local memory policy. More...
 
void allocateFloating (size_type n)
 Allocates using no memory policy (no pre alloc) More...
 
template<typename RangeArrayTy >
void allocateSpecified (size_type numberOfElements, RangeArrayTy &threadRanges)
 Allocate memory to threads based on a provided array specifying which threads receive which elements of data. More...
 
template<typename... Args>
void construct (Args &&...args)
 [allocatefunctions] More...
 
template<typename... Args>
void constructAt (size_type n, Args &&...args)
 
template<typename... Args>
void create (size_type n, Args &&...args)
 Allocate and construct. More...
 
void deallocate ()
 
void destroy ()
 
template<typename U = T>
std::enable_if_t
<!std::is_scalar< U >::value > 
destroyAt (size_type n)
 
template<typename U = T>
std::enable_if_t
< std::is_scalar< U >::value > 
destroyAt (size_type)
 
const_pointer data () const
 
pointer data ()
 

Static Public Attributes

static const bool has_value = true
 

Protected Types

enum  AllocType { Blocked, Local, Interleaved, Floating }
 

Protected Member Functions

void allocate (size_type n, AllocType t)
 

Friends

class boost::serialization::access
 
void swap (LargeArray &lhs, LargeArray &rhs)
 

Detailed Description

template<typename T>
class galois::LargeArray< T >

Large array of objects with proper specialization for void type and supporting various allocation and construction policies.

Template Parameters
Tvalue type of container
Examples:
lonestar/tutorial_examples/ConflictAwareTorus.cpp.

Member Typedef Documentation

template<typename T>
typedef const_pointer galois::LargeArray< T >::const_iterator
template<typename T>
typedef const value_type* galois::LargeArray< T >::const_pointer
template<typename T>
typedef const value_type& galois::LargeArray< T >::const_reference
template<typename T>
typedef ptrdiff_t galois::LargeArray< T >::difference_type
template<typename T>
typedef pointer galois::LargeArray< T >::iterator
template<typename T>
typedef value_type* galois::LargeArray< T >::pointer
template<typename T>
typedef T galois::LargeArray< T >::raw_value_type
template<typename T>
typedef value_type& galois::LargeArray< T >::reference
template<typename T>
typedef size_t galois::LargeArray< T >::size_type
template<typename T>
typedef T galois::LargeArray< T >::value_type

Member Enumeration Documentation

template<typename T>
enum galois::LargeArray::AllocType
protected
Enumerator
Blocked 
Local 
Interleaved 
Floating 

Constructor & Destructor Documentation

template<typename T>
galois::LargeArray< T >::LargeArray ( void *  d,
size_t  s 
)
inline

Wraps existing buffer in LargeArray interface.

template<typename T>
galois::LargeArray< T >::LargeArray ( )
inline
template<typename T>
galois::LargeArray< T >::LargeArray ( LargeArray< T > &&  o)
inline
template<typename T>
galois::LargeArray< T >::LargeArray ( const LargeArray< T > &  )
delete
template<typename T>
galois::LargeArray< T >::~LargeArray ( )
inline

Member Function Documentation

template<typename T>
void galois::LargeArray< T >::allocate ( size_type  n,
AllocType  t 
)
inlineprotected
template<typename T>
void galois::LargeArray< T >::allocateBlocked ( size_type  n)
inline

Allocates using blocked memory policy.

Parameters
nnumber of elements to allocate
template<typename T>
void galois::LargeArray< T >::allocateFloating ( size_type  n)
inline

Allocates using no memory policy (no pre alloc)

Parameters
nnumber of elements to allocate
template<typename T>
void galois::LargeArray< T >::allocateInterleaved ( size_type  n)
inline

[allocatefunctions] Allocates interleaved across NUMA (memory) nodes.

template<typename T>
void galois::LargeArray< T >::allocateLocal ( size_type  n)
inline

Allocates using Thread Local memory policy.

Parameters
nnumber of elements to allocate
template<typename T>
template<typename RangeArrayTy >
void galois::LargeArray< T >::allocateSpecified ( size_type  numberOfElements,
RangeArrayTy &  threadRanges 
)
inline

Allocate memory to threads based on a provided array specifying which threads receive which elements of data.

Template Parameters
RangeArrayTyThe type of the threadRanges array; should either be uint32_t* or uint64_t*
Parameters
numberOfElementsNumber of elements to allocate space for
threadRangesAn array specifying how elements should be split among threads
template<typename T>
const_reference galois::LargeArray< T >::at ( difference_type  x) const
inline
template<typename T>
reference galois::LargeArray< T >::at ( difference_type  x)
inline
template<typename T>
iterator galois::LargeArray< T >::begin ( void  )
inline
template<typename T>
const_iterator galois::LargeArray< T >::begin ( void  ) const
inline
template<typename T>
template<typename... Args>
void galois::LargeArray< T >::construct ( Args &&...  args)
inline

[allocatefunctions]

template<typename T>
template<typename... Args>
void galois::LargeArray< T >::constructAt ( size_type  n,
Args &&...  args 
)
inline
template<typename T>
template<typename... Args>
void galois::LargeArray< T >::create ( size_type  n,
Args &&...  args 
)
inline

Allocate and construct.

template<typename T>
const_pointer galois::LargeArray< T >::data ( ) const
inline
template<typename T>
pointer galois::LargeArray< T >::data ( )
inline
template<typename T>
void galois::LargeArray< T >::deallocate ( )
inline
template<typename T>
void galois::LargeArray< T >::destroy ( )
inline
template<typename T>
template<typename U = T>
std::enable_if_t<!std::is_scalar<U>::value> galois::LargeArray< T >::destroyAt ( size_type  n)
inline
template<typename T>
template<typename U = T>
std::enable_if_t<std::is_scalar<U>::value> galois::LargeArray< T >::destroyAt ( size_type  )
inline
template<typename T>
iterator galois::LargeArray< T >::end ( void  )
inline
template<typename T>
const_iterator galois::LargeArray< T >::end ( void  ) const
inline
template<typename T>
LargeArray& galois::LargeArray< T >::operator= ( LargeArray< T > &&  o)
inline
template<typename T>
LargeArray& galois::LargeArray< T >::operator= ( const LargeArray< T > &  )
delete
template<typename T>
const_reference galois::LargeArray< T >::operator[] ( size_type  x) const
inline
template<typename T>
reference galois::LargeArray< T >::operator[] ( size_type  x)
inline
template<typename T>
void galois::LargeArray< T >::set ( difference_type  x,
const_reference  v 
)
inline
template<typename T>
size_type galois::LargeArray< T >::size ( ) const
inline

Friends And Related Function Documentation

template<typename T>
friend class boost::serialization::access
friend
template<typename T>
void swap ( LargeArray< T > &  lhs,
LargeArray< T > &  rhs 
)
friend

Member Data Documentation

template<typename T>
const bool galois::LargeArray< T >::has_value = true
static

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