CCAFFEINE  0.8.8
Public Member Functions | Private Attributes
CCA_BlockDescription Class Reference

#include <CCA_Block.h>

Collaboration diagram for CCA_BlockDescription:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void setDimensions (int n)
void setLayout (int dimension, int gLow, int gHigh, int beginPad, int endPad, int gSize, int blockBefore, int blockAfter, int blockId)
void getLayout (int dimension, int *gLow, int *gHigh, int *beginPad, int *endPad, int *gSize, int *blockBefore, int *blockAfter, int *blockId)
void addField (int fieldTag, char *fieldString)
int getFieldOffset (int fieldTag)
int getFieldNameOffset (char *name)
void fixDescription ()
int getBlockId ()
struct CCA_dimenMapgetDimensions (int &n)
const char ** getFieldNames (int &nf)
const int * getFieldTags (int &nf)
int getNFields ()
int getIsStacked ()

Private Attributes

int nDim
int stored
struct CCA_dimenMapdim
int nFields
int capFields
int * fieldId
char ** fieldName
int locked
int blockId

Detailed Description

On each processor we have gLow-gHigh data to ourself. In addition we have beginPad <= gLow and endPad >= gHigh data shadowing other processors.

Conceivably should be rewritten in mpi data_type or Cart terms.

The Block introspection is separate from the block data because the CCA_BlockDescription could be the currency for requesting a block from a data manager. The block data manager would have the option of returning a CCA_DoubleBlock with a different but compatible description (i.e. larger, or with more fields) depending on how the data manager was queried. e.g. getBlockExact(CCA_BlockDescription * bd) {...} will do a data copy to create the block matching bd while getBlock(CCA_BlockDescription * bd) {...} makes sure only that what it returns is a superset of the specification in bd.


Member Function Documentation

void CCA_BlockDescription::addField ( int  fieldTag,
char *  fieldString 
)
Parameters:
fieldTagcan be anything but must be unique.
fieldStringmust be unique if given; it can be NULL and we'll make something up: fieldd.
int CCA_BlockDescription::getFieldOffset ( int  fieldTag)

Returns the field layer in stacked data or the field location in strided data. Returns -1 if field not known.

Returns the field layer in stacked data or the field location in strided data given a string name. Returns -1 if fieldName not known.

Returns the index of this block. total blocks in a data set are indexed 0 to n-1. Depending on the distributed memory implementation, The blockId may line up with a processor number or not.

Returns 1 if each field is stored contiguously. Returns 0 if all the fields for a given index in in the block are stored contiguously.


Member Data Documentation

0 -> strided data, 1 ->stacked data

array [nDim] long

array [nFields] long

array [nFields] long


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