#include <cklists.h>
Public Member Functions | |
CkCompactVec () | |
~CkCompactVec () | |
CkCompactVec (const this_type &src) | |
CkCompactVec (int size) | |
CkCompactVec (int size, int used) | |
CkCompactVec (const CkSkipInitialization &skip) | |
this_type & | operator= (const this_type &src) |
size_t & | length (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 |
Definition at line 657 of file cklists.h.
typedef CkVec<T> CkCompactVec< T >::this_type [private] |
CkCompactVec< T >::CkCompactVec | ( | ) | [inline] |
CkCompactVec< T >::~CkCompactVec | ( | ) | [inline] |
Definition at line 686 of file cklists.h.
References CkCompactVec< T >::freeBlock().
CkCompactVec< T >::CkCompactVec | ( | const this_type & | src | ) | [inline] |
Definition at line 687 of file cklists.h.
References CkCompactVec< T >::copyFrom().
CkCompactVec< T >::CkCompactVec | ( | int | size | ) | [inline] |
Definition at line 688 of file cklists.h.
References CkCompactVec< T >::makeBlock().
CkCompactVec< T >::CkCompactVec | ( | int | size, | |
int | used | |||
) | [inline] |
Definition at line 689 of file cklists.h.
References CkCompactVec< T >::makeBlock().
CkCompactVec< T >::CkCompactVec | ( | const CkSkipInitialization & | skip | ) | [inline] |
void CkCompactVec< T >::makeBlock | ( | int | blklen_, | |
int | len_, | |||
int | offset_ = 0 , |
|||
int | lastnull_ = -1 | |||
) | [inline, private] |
Definition at line 665 of file cklists.h.
References CkCompactVec< T >::blklen, CkCompactVec< T >::lastnull, CkCompactVec< T >::len, and CkCompactVec< T >::offset.
Referenced by CkCompactVec< T >::CkCompactVec(), CkCompactVec< T >::copyFrom(), and CkCompactVec< T >::reserve().
void CkCompactVec< T >::freeBlock | ( | void | ) | [inline, private] |
Definition at line 674 of file cklists.h.
References CkCompactVec< T >::blklen, CkCompactVec< T >::lastnull, CkCompactVec< T >::len, and CkCompactVec< T >::offset.
Referenced by CkCompactVec< T >::clear(), CkCompactVec< T >::free(), CkCompactVec< T >::operator=(), and CkCompactVec< T >::~CkCompactVec().
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=().
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().
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().
size_t CkCompactVec< T >::length | ( | void | ) | const [inline] |
T* CkCompactVec< T >::getVec | ( | void | ) | [inline] |
const T* CkCompactVec< T >::getVec | ( | void | ) | const [inline] |
T& CkCompactVec< T >::operator[] | ( | size_t | n | ) | [inline] |
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.
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().
size_t CkCompactVec< T >::capacity | ( | void | ) | const [inline] |
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().
void CkCompactVec< T >::free | ( | ) | [inline] |
Set our length to this value.
Definition at line 734 of file cklists.h.
References CkCompactVec< T >::freeBlock().
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().
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().
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().
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.
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().
void CkCompactVec< T >::removeAll | ( | ) | [inline] |
Definition at line 784 of file cklists.h.
References CkCompactVec< T >::lastnull, CkCompactVec< T >::len, and CkCompactVec< T >::offset.
void CkCompactVec< T >::clear | ( | ) | [inline] |
Definition at line 789 of file cklists.h.
References CkCompactVec< T >::freeBlock().
void CkCompactVec< T >::insertAtEnd | ( | const T & | elt | ) | [inline] |
Definition at line 794 of file cklists.h.
References CkCompactVec< T >::insert(), and CkCompactVec< T >::length().
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().
size_t CkCompactVec< T >::size | ( | void | ) | const [inline] |
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().
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().
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().
T* CkCompactVec< T >::block [private] |
size_t CkCompactVec< T >::blklen [private] |
Definition at line 661 of file cklists.h.
Referenced by CkCompactVec< T >::capacity(), CkCompactVec< T >::copyFrom(), CkCompactVec< T >::freeBlock(), CkCompactVec< T >::growAtLeast(), CkCompactVec< T >::makeBlock(), CkCompactVec< T >::marknull(), CkCompactVec< T >::remove(), and CkCompactVec< T >::reserve().
size_t CkCompactVec< T >::len [private] |
Definition at line 662 of file cklists.h.
Referenced by CkCompactVec< T >::freeBlock(), CkCompactVec< T >::insert(), CkCompactVec< T >::length(), CkCompactVec< T >::makeBlock(), CkCompactVec< T >::operator[](), CkCompactVec< T >::pupbase(), CkCompactVec< T >::remove(), CkCompactVec< T >::removeAll(), CkCompactVec< T >::reserve(), CkCompactVec< T >::resize(), CkCompactVec< T >::shrink(), and CkCompactVec< T >::size().
size_t CkCompactVec< T >::offset [private] |
Definition at line 663 of file cklists.h.
Referenced by CkCompactVec< T >::freeBlock(), CkCompactVec< T >::growAtLeast(), CkCompactVec< T >::insert(), CkCompactVec< T >::makeBlock(), CkCompactVec< T >::marknull(), CkCompactVec< T >::operator[](), CkCompactVec< T >::pup(), CkCompactVec< T >::remove(), CkCompactVec< T >::removeAll(), CkCompactVec< T >::reserve(), and CkCompactVec< T >::shrink().
size_t CkCompactVec< T >::lastnull [private] |
Definition at line 664 of file cklists.h.
Referenced by CkCompactVec< T >::freeBlock(), CkCompactVec< T >::makeBlock(), CkCompactVec< T >::marknull(), CkCompactVec< T >::pup(), CkCompactVec< T >::remove(), CkCompactVec< T >::removeAll(), CkCompactVec< T >::reserve(), and CkCompactVec< T >::shrink().