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_tlength (void)
size_t length (void) const
T * getVec (void)
const T * getVec (void) const
T & operator[] (size_t n)
const T & operator[] (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< T > this_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

T * block
size_t blklen
size_t len
size_t offset
size_t lastnull

Detailed Description

template<class T>
class CkCompactVec< T >

Definition at line 657 of file cklists.h.


Member Typedef Documentation

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

Definition at line 658 of file cklists.h.


Constructor & Destructor Documentation

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

Definition at line 685 of file cklists.h.

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

Definition at line 686 of file cklists.h.

References CkCompactVec< T >::freeBlock().

Here is the call graph for this function:

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

Definition at line 687 of file cklists.h.

References CkCompactVec< T >::copyFrom().

Here is the call graph for this function:

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

Definition at line 688 of file cklists.h.

References CkCompactVec< T >::makeBlock().

Here is the call graph for this function:

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

Definition at line 689 of file cklists.h.

References CkCompactVec< T >::makeBlock().

Here is the call graph for this function:

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

Definition at line 690 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]

Definition at line 680 of file cklists.h.

References CkCompactVec< T >::blklen, CkVec< T >::blklen, CkVec< T >::block, CkSTLHelper< T >::elementCopy(), CkVec< T >::len, and CkCompactVec< T >::makeBlock().

Referenced by CkCompactVec< T >::CkCompactVec(), and CkCompactVec< T >::operator=().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 691 of file cklists.h.

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

Here is the call graph for this function:

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

Definition at line 697 of file cklists.h.

References CkCompactVec< T >::len.

Referenced by CkCompactVec< T >::insertAtEnd(), CkCompactVec< T >::push_back(), and CkCompactVec< T >::push_back_v().

Here is the caller graph for this function:

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

Definition at line 698 of file cklists.h.

References CkCompactVec< T >::len.

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

Definition at line 699 of file cklists.h.

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

Definition at line 700 of file cklists.h.

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

Definition at line 702 of file cklists.h.

References CkCompactVec< T >::offset.

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

Definition at line 707 of file cklists.h.

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

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

Reserve at least this much space (changes capacity, size unchanged).

Definition at line 713 of file cklists.h.

References CkCompactVec< T >::blklen, CkSTLHelper< T >::elementCopy(), CkCompactVec< T >::lastnull, CkCompactVec< T >::len, CkCompactVec< T >::makeBlock(), and CkCompactVec< T >::offset.

Referenced by CkCompactVec< T >::growAtLeast(), and CkCompactVec< T >::resize().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 724 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 727 of file cklists.h.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Set our length to this value.

Definition at line 734 of file cklists.h.

References CkCompactVec< T >::freeBlock().

Here is the call graph for this function:

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

Definition at line 739 of file cklists.h.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 742 of file cklists.h.

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

Referenced by CkCompactVec< T >::insertAtEnd(), CkCompactVec< T >::push_back(), and CkCompactVec< T >::push_back_v().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 749 of file cklists.h.

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

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

Here is the caller graph for this function:

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

Definition at line 755 of file cklists.h.

References CkCompactVec< T >::blklen, CmiAbort(), CkCompactVec< T >::lastnull, CkCompactVec< T >::len, and CkCompactVec< T >::offset.

Here is the call graph for this function:

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

Definition at line 779 of file cklists.h.

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

Here is the call graph for this function:

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

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

Definition at line 789 of file cklists.h.

References CkCompactVec< T >::freeBlock().

Here is the call graph for this function:

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

Definition at line 794 of file cklists.h.

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

Here is the call graph for this function:

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

Definition at line 797 of file cklists.h.

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

Here is the call graph for this function:

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

Definition at line 798 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 801 of file cklists.h.

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

Here is the call graph for this function:

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

Definition at line 806 of file cklists.h.

References PUP::er::isUnpacking(), PUP::l, CkCompactVec< T >::len, p, and CkCompactVec< T >::resize().

Here is the call graph for this function:

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

Definition at line 816 of file cklists.h.

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

Here is the call graph for this function:


Field Documentation

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

Definition at line 660 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 Mon Sep 21 08:19:42 2020 for Charm++ by  doxygen 1.5.5