PPL Logo

CkArrayIndex Class Reference

Actual array index class intended for regular use. More...

#include <ckarrayindex.h>

Inheritance diagram for CkArrayIndex:

Inheritance graph
[legend]
Collaboration diagram for CkArrayIndex:

Collaboration graph
[legend]

Public Member Functions

 CkArrayIndex ()
 Default.
 CkArrayIndex (int idx)
intdata (void)
 Return a pointer to the actual index data.
const intdata (void) const
 Return a const pointer to the actual index data.
int getCombinedCount (void) const
 Return the total number of elements (assuming a dense chare array).
void print ()
 Used for debug prints elsewhere.
CmiBool operator== (const CkArrayIndex &idx) const
 Equality comparison.
CkHashCode hash (void) const
 These routines allow CkArrayIndex to be used in a CkHashtableT.
int compare (const CkArrayIndex &idx) const
CmiObjIdgetProjectionID (int arrayID)

Static Public Member Functions

static CkHashCode staticHash (const void *a, size_t)
static int staticCompare (const void *a, const void *b, size_t)

Protected Member Functions

void init (const short num, const short dims, const int x, const int y=0, const int z=0)
void init (const short num, const short dims, const short u, const short v, const short w, const short x, const short y=0, const short z=0)

Detailed Description

Actual array index class intended for regular use.

Warning:
: Put all data members in base class or they may not be transmitted in envelopes or callbacks (basically in any entity that stores indices in a union). Only add behaviors to this class.

Definition at line 65 of file ckarrayindex.h.


Constructor & Destructor Documentation

CkArrayIndex::CkArrayIndex (  )  [inline]

Default.

Definition at line 69 of file ckarrayindex.h.

References CkArrayIndexBase::dimension, CkArrayIndexBase::index, and CkArrayIndexBase::nInts.

CkArrayIndex::CkArrayIndex ( int  idx  )  [inline]

Definition at line 71 of file ckarrayindex.h.

References init().


Member Function Documentation

int* CkArrayIndex::data ( void   )  [inline]

const int* CkArrayIndex::data ( void   )  const [inline]

Return a const pointer to the actual index data.

Definition at line 76 of file ckarrayindex.h.

References CkArrayIndexBase::index.

int CkArrayIndex::getCombinedCount ( void   )  const [inline]

Return the total number of elements (assuming a dense chare array).

Definition at line 79 of file ckarrayindex.h.

References data(), and CkArrayIndexBase::dimension.

Referenced by arrInfo::distrib(), arrInfo::getMap(), and ArrayElement::initBasics().

void CkArrayIndex::print (  )  [inline]

CmiBool CkArrayIndex::operator== ( const CkArrayIndex idx  )  const [inline]

Equality comparison.

Definition at line 91 of file ckarrayindex.h.

References CmiFalse, CmiTrue, CkArrayIndexBase::index, and CkArrayIndexBase::nInts.

CkHashCode CkArrayIndex::hash ( void   )  const [inline]

static CkHashCode CkArrayIndex::staticHash ( const void *  a,
size_t   
) [inline, static]

Definition at line 110 of file ckarrayindex.h.

int CkArrayIndex::compare ( const CkArrayIndex idx  )  const [inline]

Definition at line 112 of file ckarrayindex.h.

Referenced by CkObjID::operator==().

static int CkArrayIndex::staticCompare ( const void *  a,
const void *  b,
size_t   
) [inline, static]

Definition at line 114 of file ckarrayindex.h.

CmiObjId* CkArrayIndex::getProjectionID ( int  arrayID  )  [inline]

Note:
: input arrayID is ignored
Todo:
: Chee Wai Lee had a FIXME note attached to this method because he felt it was a temporary solution

Definition at line 122 of file ckarrayindex.h.

References circleShift(), data(), _CmiObjId::id, and CkArrayIndexBase::nInts.

Referenced by CkLocRec_local::invokeEntry().

void CkArrayIndex::init ( const short  num,
const short  dims,
const int  x,
const int  y = 0,
const int  z = 0 
) [inline, protected]

void CkArrayIndex::init ( const short  num,
const short  dims,
const short  u,
const short  v,
const short  w,
const short  x,
const short  y = 0,
const short  z = 0 
) [inline, protected]


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

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