PPL Logo

CkVec< T > Class Template Reference

A typesafe, automatically growing array. More...

#include <cklists.h>

Inherits CkSTLHelper< T >< T >.

Collaboration diagram for CkVec< T >:

Collaboration graph
[legend]

Public Member Functions

 CkVec ()
 ~CkVec ()
 CkVec (const this_type &src)
 CkVec (int size)
 CkVec (int size, int used)
 CkVec (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 remove (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)
void quickSort ()
void quickSort (int changeOverSize)
void q_sort (int left, int right, int changeOverSize)
void bubbleSort (int left, int right)

Private Types

typedef CkVec< T > this_type

Private Member Functions

void makeBlock (int blklen_, int len_)
void freeBlock (void)
void copyFrom (const this_type &src)

Private Attributes

T * block
size_t blklen
size_t len

Detailed Description

template<class T>
class CkVec< T >

A typesafe, automatically growing array.

Classes used must have a default constructor and working copy constructor. This class is modelled after, but *not* identical to, std::vector. The elements of the array are pup'd using plain old "p|elt;". The main use case for CkVec is global variables (see CkSkipInitialization above).

Definition at line 183 of file cklists.h.


Member Typedef Documentation

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


Constructor & Destructor Documentation

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

Definition at line 207 of file cklists.h.

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

Definition at line 208 of file cklists.h.

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

Definition at line 209 of file cklists.h.

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

Definition at line 210 of file cklists.h.

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

Definition at line 211 of file cklists.h.

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

Definition at line 212 of file cklists.h.


Member Function Documentation

template<class T>
void CkVec< T >::makeBlock ( int  blklen_,
int  len_ 
) [inline, private]

Definition at line 189 of file cklists.h.

Referenced by CkVec< CkZeroPtr< T, PUP_PTR > >::CkVec(), CkVec< CkZeroPtr< T, PUP_PTR > >::copyFrom(), and CkVec< CkZeroPtr< T, PUP_PTR > >::reserve().

Here is the caller graph for this function:

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

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

Definition at line 202 of file cklists.h.

Referenced by CkVec< CkZeroPtr< T, PUP_PTR > >::CkVec(), and CkVec< CkZeroPtr< T, PUP_PTR > >::operator=().

Here is the caller graph for this function:

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

Reimplemented in CkPupAblePtrVec< CkArrayListener >, and CkPupAblePtrVec< FEM_Sym_Desc >.

Definition at line 213 of file cklists.h.

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

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

Definition at line 220 of file cklists.h.

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

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

Definition at line 222 of file cklists.h.

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

Definition at line 224 of file cklists.h.

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

Definition at line 229 of file cklists.h.

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

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

Definition at line 235 of file cklists.h.

Referenced by CkVec< CkZeroPtr< T, PUP_PTR > >::growAtLeast(), PUPmarshall(), and CkVec< CkZeroPtr< T, PUP_PTR > >::resize().

Here is the caller graph for this function:

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

Definition at line 244 of file cklists.h.

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

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

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

Definition at line 259 of file cklists.h.

Referenced by CkVec< CkZeroPtr< T, PUP_PTR > >::insert().

Here is the caller graph for this function:

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

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

Definition at line 269 of file cklists.h.

Referenced by TraceArray::clearTrace(), FEM_remove_element(), FEM_Mesh::n2e_remove(), FEM_Mesh::n2n_remove(), removeFromAdaptAdj(), and BaseLB::LDStats::removeObject().

Here is the caller graph for this function:

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

Definition at line 279 of file cklists.h.

Referenced by FEM_AdaptL::edge_contraction_help(), FEM_lock::FEM_lock(), FEM_lock::lock(), CpdPythonGroup::nextIteratorUpdate(), and FEM_lock::unlock().

Here is the caller graph for this function:

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

Definition at line 283 of file cklists.h.

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

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

Definition at line 291 of file cklists.h.

Referenced by MSA_Listeners::add(), IDXL_Side::add(), FEM_Sym_List::add(), CkRegisteredInfo< T >::add(), LBDBRegistry::addCompiletimeBalancer(), FEM_Partition::addGhostStencil(), FEM_Partition::addLayer(), IDXL_Side::addList(), CkArrayOptions::addListener(), LBDBRegistry::addRuntimeBalancer(), IDXL_Chunk::addStatic(), addToAdaptAdj(), addToLists(), TraceArray::addTrace(), FEM_MUtil::buildChunkToNodeTable(), HybridBaseLB::collectCommData(), HbmLB::collectCommData(), HybridBaseLB::CollectInfo(), ParFUMShadowArray::collectLocalNodes(), threadCollideMgr::collisions(), BaseLB::LDStats::computeNonlocalComm(), RefinerComm::create(), taskGraphSolver::dependsOn(), FEM_Adapt::edge_bisect_help(), FEM_AdaptL::edge_contraction_help(), FEM_Adapt::edge_flip_help(), FEM_chunk::exchangeGhostLists(), FEMchunk::exchangeGhostLists(), FEM_add_element(), FEM_add_node_local(), FEM_REFINE2D_Split(), FEM_Refine_Operation(), FEM_remove_element(), fillLocalAdaptAdjacencies(), FEM_MUtil::findGhostSend(), LBInfo::getInfo(), HybridBaseLB::GetObjsToMigrate(), getRoccomPconn(), FEM_lock::lock(), ParFUMShadowArray::lockRegion(), makeGhost(), FEM_Partition::markGhostStencilLayer(), HbmLB::Migrated(), MulticastAgent::MulticastAgent(), FEM_Mesh::n2e_add(), FEM_Mesh::n2n_add(), ArmciVirtualProcessor::nbget(), ArmciVirtualProcessor::nbget_implicit(), ArmciVirtualProcessor::nbgets(), ArmciVirtualProcessor::nbgets_implicit(), ArmciVirtualProcessor::nbput(), ArmciVirtualProcessor::nbput_implicit(), ArmciVirtualProcessor::nbputs(), ArmciVirtualProcessor::nbputs_implicit(), ArmciVirtualProcessor::notify_wait(), HybridBaseLB::ObjMigrated(), HbmLB::ObjMigrated(), HybridBaseLB::ObjsMigrated(), FEM_Sym_List::operator=(), HybridBaseLB::PropagateInfo(), IDXL_List::push_back(), FEM_T_List< FEM_Mesh >::put(), ArmciVirtualProcessor::put(), ArmciVirtualProcessor::puts(), OrbLB::rec_divide(), HbmLB::ReceiveMigrationDelta(), threadCollideMgr::registerContributor(), FEM_MUtil::Replace_node_local(), replyAdjacencyRequests(), ArmciVirtualProcessor::sendNote(), IDXL_List::set(), FEM_Node::setElemAdjacency(), femMeshModify::setFemMesh(), FEM_Node::setNodeAdjacency(), IDXL_Chunk::storeToFreeIndex(), taskGraphAdd(), TCHARM_Register_thread_function(), update_new_element_e2e(), VectorStrategy(), ArmciVirtualProcessor::waitall(), ArmciVirtualProcessor::waitproc(), PhasebyArrayLB::work(), OrbLB::work(), and GreedyCommLB::work().

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

Definition at line 292 of file cklists.h.

Referenced by FEM_Sym_List::add(), CkRegisteredInfo< T >::add(), addIDXLists(), IDXL_Chunk::addStatic(), ArmciVirtualProcessor::allfence(), FEM_Sym_List::applyLoc(), FEM_Sym_List::applyVec(), FEM_T_List< FEM_Mesh >::badIndex(), CpdPythonGroup::buildIterator(), FEM_T_List< FEM_Mesh >::check(), CkArray::CkArray(), HybridBaseLB::CollectInfo(), BaseLB::LDStats::computeNonlocalComm(), splitter::consistencyCheck(), FEM_Entity::copyEntity(), FEM_Entity::copyShape(), splitter::createMesh(), HybridBaseLB::createMigrateMsg(), taskGraphArray::deleteElement(), IDXL_Chunk::destroy(), FEM_Adapt::edge_bisect_help(), FEM_AdaptL::edge_contraction_help(), FEM_Adapt::edge_flip_help(), FEM_T_List< FEM_Mesh >::empty(), IDXL_List::exists(), FEM_lock::existsChunk(), FEM_add_node_local(), FEM_Get_ghost_list_length(), FEM_Get_roccom_pconn_size(), FEM_Ghost_Essential_attributes(), FEM_Interpolate::FEM_InterpolateCopyAttributes(), FEM_Interpolate::FEM_InterpolateElementCopy(), FEM_Interpolate::FEM_InterpolateNodeInElement(), FEM_Interpolate::FEM_InterpolateNodeOnEdge(), FEM_Interpolate::FEM_InterpolateNodeOnFace(), FEM_REFINE2D_Split(), FEM_Refine_Operation(), FEM_remove_element(), ArmciVirtualProcessor::fence(), fillLocalAdaptAdjacencies(), FEM_MUtil::findGhostSend(), IDXL_Side::findLocalList(), IDXL_List::get(), BulkAdapt::get_elemsToLock(), getAndDumpAdaptAdjacencies(), FEM_Entity::getAttrs(), femMeshModify::getfmLockN(), LBInfo::getInfo(), CkArrayOptions::getListeners(), IDXL_Side::getListN(), IDXL_Side::getMap(), FEM_Partition::getRegions(), getRoccomPconn(), interpolateNode(), FEM_Adapt::isFixedNode(), femMeshModify::isFixedNodeRemote(), LBDBInit::LBDBInit(), HybridBaseLB::Loadbalancing(), FEM_lock::lock(), ParFUMShadowArray::lockRegion(), ParFUMShadowArray::lockReply(), IDXL_Chunk::lookup(), makeGhost(), NumberedVec< CkVec< int > >::makeLonger(), HbmLB::MigrationDone(), MulticastAgent::my_preferred_procs(), InfoStruct::myfree(), ArmciVirtualProcessor::nbget(), ArmciVirtualProcessor::nbget_implicit(), ArmciVirtualProcessor::nbgets(), ArmciVirtualProcessor::nbgets_implicit(), ArmciVirtualProcessor::nbput(), ArmciVirtualProcessor::nbput_implicit(), ArmciVirtualProcessor::nbputs(), ArmciVirtualProcessor::nbputs_implicit(), CpdPythonGroup::nextIteratorUpdate(), ArmciVirtualProcessor::notify_wait(), FEM_Sym_List::operator=(), NumberedVec< CkVec< int > >::operator[](), CkRegisteredInfo< T >::operator[](), CkRegisteredInfo< T >::outOfBounds(), femMeshModify::packElemData(), FEM_MUtil::packEntData(), ParFUM_generateGlobalNodeNumbers(), HybridBaseLB::PropagateInfo(), IDXL_Chunk::pup(), PUPmarshall(), IDXL_List::push_back(), FEM_T_List< FEM_Mesh >::put(), ArmciVirtualProcessor::put(), ArmciVirtualProcessor::puts(), OrbLB::rec_divide(), HybridBaseLB::ReceiveMigration(), HbmLB::ReceiveMigrationDelta(), HybridBaseLB::ReceiveVectorMigration(), DistributedLB::RecvAck(), threadCollideMgr::registerContributor(), CkArray::remoteBeginInserting(), threadCollideMgr::remoteCollisions(), CkArray::remoteDoneInserting(), removeFromAdaptAdj(), IDXL_Side::removeNode(), BaseLB::LDStats::removeObject(), replaceAdaptAdjOnEdge(), searchAdjElemInList(), ArmciVirtualProcessor::sendNote(), IDXL_List::set(), femMeshModify::setPointersAfterMigrate(), MSA_Listeners::signal(), MSA_Listeners::size(), IDXL_Side::size(), IDXL_List::size(), FEM_T_List< FEM_Mesh >::size(), NumberedVec< CkVec< int > >::size(), CkRegisteredInfo< T >::size(), IDXL_Side::sort2d(), IDXL_List::sort2d(), IDXL_Side::sort3d(), IDXL_List::sort3d(), sortNodeList(), HybridBaseLB::StartCollectInfo(), IDXL_Chunk::storeToFreeIndex(), TCHARM_Register_thread_function(), taskGraphArray::tryToSolve(), FEM_lock::unlock(), IDXL_List::unset(), BulkAdapt::update_local_edge_adj(), FEM_MUtil::updateAttrs(), femMeshModify::updateNodeAttrs(), HybridBaseLB::LevelData::useMem(), HybridBaseLB::useMem(), HbmLB::LevelData::useMem(), TraceBluegene::userBracketEvent(), ArmciVirtualProcessor::waitall(), ArmciVirtualProcessor::waitproc(), OrbLB::work(), GreedyCommLB::work(), CkRegisteredInfo< T >::~CkRegisteredInfo(), IDXL_Chunk::~IDXL_Chunk(), and MSA_Listeners::~MSA_Listeners().

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

Definition at line 295 of file cklists.h.

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

Definition at line 300 of file cklists.h.

Referenced by pupCkVec().

Here is the caller graph for this function:

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

template<class T>
void CkVec< T >::quickSort (  )  [inline]

Definition at line 315 of file cklists.h.

Referenced by addElementNodeSetData(), replyAdjacencyRequests(), sortNodeList(), uniquify(), and UniqElemList< T >::uniquify().

Here is the caller graph for this function:

template<class T>
void CkVec< T >::quickSort ( int  changeOverSize  )  [inline]

Definition at line 319 of file cklists.h.

template<class T>
void CkVec< T >::q_sort ( int  left,
int  right,
int  changeOverSize 
) [inline]

Definition at line 324 of file cklists.h.

Referenced by CkVec< CkZeroPtr< T, PUP_PTR > >::q_sort(), and CkVec< CkZeroPtr< T, PUP_PTR > >::quickSort().

Here is the caller graph for this function:

template<class T>
void CkVec< T >::bubbleSort ( int  left,
int  right 
) [inline]

Definition at line 369 of file cklists.h.

Referenced by CkVec< CkZeroPtr< T, PUP_PTR > >::q_sort().

Here is the caller graph for this function:


Field Documentation

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

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

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


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

Generated on Mon Sep 21 08:21:41 2020 for Charm++ by  doxygen 1.5.5