PPL Logo

CkArrayIndexBase Struct Reference

Base class for array index objects used in charm. More...

#include <ckarrayindex.h>

Collaboration diagram for CkArrayIndexBase:

Collaboration graph
[legend]

Public Member Functions

CkArrayIndex & asChild () const
 Obtain usable object from base object.
void pup (PUP::er &p)
 Permit serialization via calling pup(), but also declare this type as PUPbytes below.
bool operator== (CkArrayIndexBase &other)

Data Fields

short unsigned int nInts
 Length of index in *integers*.
short unsigned int dimension
 Number of dimensions in this index, not valid for user-defined indices.
union {
   int   index [CK_ARRAYINDEX_MAXLEN]
   short int   indexShorts [2 *CK_ARRAYINDEX_MAXLEN]
}; 

Detailed Description

Base class for array index objects used in charm.

An array index is just a hash key; a run of integers used to look up an object in a hash table.

Note:
: Should define *all* data members that make up an index object.
Warning:
: Do not instantiate! Always create and use a child class

: Do not add constructors / destructors. Class participates in unions

Note:
: Should be completely invisible to most client code except those that directly need to put index objects in unions. This happens only in a few entities in the charm codebase and should not happen at all in user codes.

Definition at line 39 of file ckarrayindex.h.


Member Function Documentation

CkArrayIndex& CkArrayIndexBase::asChild (  )  const [inline]

Obtain usable object from base object.

Warning:
: Dangerous pointer cast to child class!!!

Definition at line 53 of file ckarrayindex.h.

Referenced by CkCallbackSendExt(), CkObjID::getObject(), CkObjID::guessPE(), CkObjID::operator CkHashCode(), CkObjID::operator==(), CkCallback::send(), sendArrayMsg(), CkObjID::toString(), and updateHomePE().

Here is the caller graph for this function:

void CkArrayIndexBase::pup ( PUP::er p  )  [inline]

Permit serialization via calling pup(), but also declare this type as PUPbytes below.

Definition at line 56 of file ckarrayindex.h.

References p.

bool CkArrayIndexBase::operator== ( CkArrayIndexBase other  )  [inline]

Definition at line 61 of file ckarrayindex.h.

References dimension, index, and nInts.


Field Documentation

short unsigned int CkArrayIndexBase::nInts

Length of index in *integers*.

Definition at line 43 of file ckarrayindex.h.

Referenced by operator==().

Number of dimensions in this index, not valid for user-defined indices.

Definition at line 45 of file ckarrayindex.h.

Referenced by CkCallbackSendExt(), and operator==().

int CkArrayIndexBase::index[CK_ARRAYINDEX_MAXLEN]

Definition at line 48 of file ckarrayindex.h.

Referenced by operator==().

short int CkArrayIndexBase::indexShorts[2 *CK_ARRAYINDEX_MAXLEN]

Definition at line 49 of file ckarrayindex.h.

union { ... }


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

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