1
#ifndef DADFDescriptor_h_seen
2
#define DADFDescriptor_h_seen
4
/** This is our implementation of DistArrayDescriptor. It is kept
5
private within the DistArrayDescriptorFactory. Only
6
DistArrayDescriptor is exposed to the outside.
8
$Id: DADFDescriptor.h,v 1.1 2003-08-01 00:41:53 manoj Exp $
14
#include "DistArrayDescriptor.h"
15
#include "DADFTemplate.h"
17
class DADFDescriptor : public DistArrayDescriptor {
20
/****************************************************************************
21
* Constructors and destructors
22
***************************************************************************/
24
/** Simple constructor for internal use. */
27
/** Normal constructor -- forces setting of name */
28
DADFDescriptor( const std::string name ) ;
30
/** Copy constructor */
31
DADFDescriptor( const std::string name, DADFDescriptor & original );
33
/** The usual destructor */
34
virtual ~DADFDescriptor();
37
virtual int setDataType(const enum DataType type);
39
/** Associate this data object with a distribution template. */
40
virtual int setTemplate(DistArrayTemplate * & templ);
42
/** Sets this process's location in the process topology. */
43
virtual int setMyProcCoords(const int procCoords[] );
45
/** Align object to template with identity mapping. */
46
virtual int setIdentityAlignmentMap();
48
/** Set pointer for the local region of the data object. */
49
virtual int setLocalDataPointer(void* data, const int strides[]);
51
/** Set pointer for a local region of an explicitly distributed
54
virtual int setRegionDataPointer(const int lower[], const int
55
upper[], void* data, const int
58
/** Signal that data object is completely defined. */
61
/****************************************************************************
62
* Query the descriptor
63
***************************************************************************/
65
/** Return name given to descriptor */
66
virtual std::string getName();
68
/** Has commit() been called on this descriptor? */
69
virtual bool isDefined();
72
virtual DistArrayDescriptor::DataType getDataType();
74
/** Return pointer to distribution template associated with this
77
virtual DistArrayTemplate * getTemplate();
79
/** Get this process's location in the process topology. */
80
virtual int getMyProcCoords(int procCoords[] );
82
/** Mainly for testing and debugging */
83
virtual void printDescriptor();
85
/** Part of a kludge for debugging. */
86
virtual int getNumLocalRegions();
88
/** Part of a kludge for debugging. */
89
virtual int getLocalRegionInfo(int region, int lower[], int upper[],
90
void * & data, int strides[]);
92
/****************************************************************************
94
***************************************************************************/
97
// Human-readable name for this descriptor
100
// Whether or not commit() has been called
109
// Shorthand check if this is an explicit distribution
110
bool _isExplicitDist;
112
// Array distribution template for this descriptor
113
DistArrayTemplate * _templ;
115
// Global lower bounds of array
116
std::vector<int> _lowerBounds;
118
// Global upper bounds of array
119
std::vector<int> _upperBounds;
122
std::vector<int> _topology;
124
// Coordinates of this process in topology
125
std::vector<int> _procCoords;
127
// List of regions associated with this process of array
128
std::list<DADFRegionInfo *> _regionList;
130
#endif // DADFDescriptor_h_seen