PPL Logo

CkCompactVec< T > Class Template Reference

#include <cklists.h>

Inheritance diagram for CkCompactVec< T >:

Inheritance graph
[legend]
Collaboration diagram for CkCompactVec< T >:

Collaboration graph
[legend]

Public Member Functions

 CkCompactVec ()
 ~CkCompactVec ()
 CkCompactVec (const this_type &src)
 CkCompactVec (int size)
 CkCompactVec (int size, int used)
 CkCompactVec (const CkSkipInitialization &skip)
this_typeoperator= (const this_type &src)
size_t & length (void)
size_t length (void) const
TgetVec (void)
const TgetVec (void) const
Toperator[] (size_t n)
const Toperator[] (size_t n) const
int reserve (size_t newcapacity)
 Reserve at least this much space (changes capacity, size unchanged).
size_t capacity (void) const
int resize (size_t newsize)
 Set our length to this value.
void free ()
 Set our length to this value.
void growAtLeast (size_t pos)
void insert (size_t pos, const T &elt)
void shrink ()
void remove (size_t pos)
void marknull (size_t pos)
void removeAll ()
void clear ()
void insertAtEnd (const T &elt)
void push_back (const T &elt)
size_t size (void) const
size_t push_back_v (const T &elt)
int pupbase (PUP::er &p)
void pup (PUP::er &p)

Private Types

typedef CkVec< Tthis_type

Private Member Functions

void makeBlock (int blklen_, int len_, int offset_=0, int lastnull_=-1)
void freeBlock (void)
void copyFrom (const this_type &src)

Private Attributes

Tblock
size_t blklen
size_t len
size_t offset
size_t lastnull

Detailed Description

template<class T>
class CkCompactVec< T >

Definition at line 653 of file cklists.h.


Member Typedef Documentation

template<class T>
typedef CkVec<T> CkCompactVec< T >::this_type [private]

Definition at line 654 of file cklists.h.


Constructor & Destructor Documentation

template<class T>
CkCompactVec< T >::CkCompactVec (  )  [inline]

Definition at line 681 of file cklists.h.

template<class T>
CkCompactVec< T >::~CkCompactVec (  )  [inline]

Definition at line 682 of file cklists.h.

References CkCompactVec< T >::freeBlock().

template<class T>
CkCompactVec< T >::CkCompactVec ( const this_type src  )  [inline]

Definition at line 683 of file cklists.h.

References CkCompactVec< T >::copyFrom().

template<class T>
CkCompactVec< T >::CkCompactVec ( int  size  )  [inline]

Definition at line 684 of file cklists.h.

References CkCompactVec< T >::makeBlock().

template<class T>
CkCompactVec< T >::CkCompactVec ( int  size,
int  used 
) [inline]

Definition at line 685 of file cklists.h.

References CkCompactVec< T >::makeBlock().

template<class T>
CkCompactVec< T >::CkCompactVec ( const CkSkipInitialization skip  )  [inline]

Definition at line 686 of file cklists.h.


Member Function Documentation

template<class T>
void CkCompactVec< T >::makeBlock ( int  blklen_,
int  len_,
int  offset_ = 0,
int  lastnull_ = -1 
) [inline, private]

template<class T>
void CkCompactVec< T >::freeBlock ( void   )  [inline, private]

template<class T>
void CkCompactVec< T >::copyFrom ( const this_type src  )  [inline, private]

template<class T>
this_type& CkCompactVec< T >::operator= ( const this_type src  )  [inline]

Definition at line 687 of file cklists.h.

References CkCompactVec< T >::copyFrom(), and CkCompactVec< T >::freeBlock().

template<class T>
size_t& CkCompactVec< T >::length ( void   )  [inline]

template<class T>
size_t CkCompactVec< T >::length ( void   )  const [inline]

Definition at line 694 of file cklists.h.

References CkCompactVec< T >::len.

template<class T>
T* CkCompactVec< T >::getVec ( void   )  [inline]

Definition at line 695 of file cklists.h.

template<class T>
const T* CkCompactVec< T >::getVec ( void   )  const [inline]

Definition at line 696 of file cklists.h.

template<class T>
T& CkCompactVec< T >::operator[] ( size_t  n  )  [inline]

Definition at line 698 of file cklists.h.

References CkCompactVec< T >::offset.

template<class T>
const T& CkCompactVec< T >::operator[] ( size_t  n  )  const [inline]

Definition at line 703 of file cklists.h.

References CkCompactVec< T >::len, and CkCompactVec< T >::offset.

template<class T>
int CkCompactVec< T >::reserve ( size_t  newcapacity  )  [inline]

template<class T>
size_t CkCompactVec< T >::capacity ( void   )  const [inline]

Definition at line 720 of file cklists.h.

References CkCompactVec< T >::blklen.

template<class T>
int CkCompactVec< T >::resize ( size_t  newsize  )  [inline]

Set our length to this value.

Definition at line 723 of file cklists.h.

References CkCompactVec< T >::len, and CkCompactVec< T >::reserve().

Referenced by CkCompactVec< T >::pupbase().

template<class T>
void CkCompactVec< T >::free ( void   )  [inline]

Set our length to this value.

Definition at line 730 of file cklists.h.

References CkCompactVec< T >::freeBlock().

template<class T>
void CkCompactVec< T >::growAtLeast ( size_t  pos  )  [inline]

template<class T>
void CkCompactVec< T >::insert ( size_t  pos,
const T elt 
) [inline]

template<class T>
void CkCompactVec< T >::shrink ( void   )  [inline]

template<class T>
void CkCompactVec< T >::remove ( size_t  pos  )  [inline]

template<class T>
void CkCompactVec< T >::marknull ( size_t  pos  )  [inline]

template<class T>
void CkCompactVec< T >::removeAll (  )  [inline]

template<class T>
void CkCompactVec< T >::clear (  )  [inline]

Definition at line 785 of file cklists.h.

References CkCompactVec< T >::freeBlock().

template<class T>
void CkCompactVec< T >::insertAtEnd ( const T elt  )  [inline]

Definition at line 790 of file cklists.h.

References CkCompactVec< T >::insert(), and CkCompactVec< T >::length().

template<class T>
void CkCompactVec< T >::push_back ( const T elt  )  [inline]

Definition at line 793 of file cklists.h.

References CkCompactVec< T >::insert(), and CkCompactVec< T >::length().

template<class T>
size_t CkCompactVec< T >::size ( void   )  const [inline]

Definition at line 794 of file cklists.h.

References CkCompactVec< T >::len.

template<class T>
size_t CkCompactVec< T >::push_back_v ( const T elt  )  [inline]

Definition at line 797 of file cklists.h.

References CkCompactVec< T >::insert(), and CkCompactVec< T >::length().

template<class T>
int CkCompactVec< T >::pupbase ( PUP::er p  )  [inline]

template<class T>
void CkCompactVec< T >::pup ( PUP::er p  )  [inline]

Definition at line 812 of file cklists.h.

References CkCompactVec< T >::lastnull, CkCompactVec< T >::offset, and pupCkVec().


Field Documentation

template<class T>
T* CkCompactVec< T >::block [private]

Definition at line 656 of file cklists.h.

template<class T>
size_t CkCompactVec< T >::blklen [private]

template<class T>
size_t CkCompactVec< T >::len [private]

template<class T>
size_t CkCompactVec< T >::offset [private]

template<class T>
size_t CkCompactVec< T >::lastnull [private]


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

Generated on Thu May 24 07:57:07 2012 for Charm++ by  doxygen 1.5.5