libSplash
DomainCollector.hpp
1 
23 #ifndef DOMAINCOLLECTOR_HPP
24 #define DOMAINCOLLECTOR_HPP
25 
26 #include "splash/domains/IDomainCollector.hpp"
27 #include "splash/SerialDataCollector.hpp"
28 #include "splash/Dimensions.hpp"
29 #include "splash/Selection.hpp"
30 #include "splash/DCException.hpp"
31 
32 namespace splash
33 {
34 
52  {
53  public:
58  DomainCollector(uint32_t maxFileHandles);
59 
63  virtual ~DomainCollector();
64 
65  Domain getGlobalDomain(int32_t id,
66  const char* name) throw (DCException);
67 
68  Domain getLocalDomain(int32_t id,
69  const char* name) throw (DCException);
70 
71  DataContainer *readDomain(int32_t id,
72  const char* name,
73  Domain domain,
74  DomDataClass* dataClass,
75  bool lazyLoad = false) throw (DCException);
76 
77  void readDomainLazy(DomainData *domainData) throw (DCException);
78 
79  void writeDomain(int32_t id,
80  const CollectionType& type,
81  uint32_t ndims,
82  const Selection select,
83  const char* name,
84  const Domain localDomain,
85  const Domain globalDomain,
86  DomDataClass dataClass,
87  const void* buf) throw (DCException);
88 
89  void appendDomain(int32_t id,
90  const CollectionType& type,
91  size_t count,
92  const char *name,
93  const Domain localDomain,
94  const Domain globalDomain,
95  const void *buf) throw (DCException);
96 
97  void appendDomain(int32_t id,
98  const CollectionType& type,
99  size_t count,
100  size_t offset,
101  size_t striding,
102  const char *name,
103  const Domain localDomain,
104  const Domain globalDomain,
105  const void *buf) throw (DCException);
106 
107  protected:
108  void writeDomainAttributes(
109  int32_t id,
110  const char *name,
111  DomDataClass dataClass,
112  const Domain localDomain,
113  const Domain globalDomain) throw (DCException);
114 
115  bool readDomainInfoForRank(
116  Dimensions mpiPosition,
117  int32_t id,
118  const char* name,
119  const Domain requestDomain,
120  Domain &fileDomain) throw (DCException);
121 
122  bool readDomainDataForRank(
123  DataContainer *dataContainer,
124  DomDataClass *dataClass,
125  Dimensions mpiPosition,
126  int32_t id,
127  const char* name,
128  const Domain requestDomain,
129  bool lazyLoad) throw (DCException);
130 
131  void readGridInternal(
132  DataContainer *dataContainer,
133  Dimensions mpiPosition,
134  int32_t id,
135  const char* name,
136  const Domain &clientDomain,
137  const Domain &requestDomain) throw (DCException);
138 
139  void readPolyInternal(
140  DataContainer *dataContainer,
141  Dimensions mpiPosition,
142  int32_t id,
143  const char* name,
144  const Dimensions &dataSize,
145  const Domain &clientDomain,
146  bool lazyLoad) throw (DCException);
147 
148  void readGlobalSizeFallback(int32_t id,
149  const char *dataName,
150  hsize_t* data,
151  Dimensions *mpiPosition) throw (DCException);
152 
153  void readGlobalOffsetFallback(int32_t id,
154  const char *dataName,
155  hsize_t* data,
156  Dimensions *mpiPosition) throw (DCException);
157  };
158 
159 }
160 
161 #endif /* DOMAINCOLLECTOR_HPP */
Domain getGlobalDomain(int32_t id, const char *name)
void writeDomain(int32_t id, const CollectionType &type, uint32_t ndims, const Selection select, const char *name, const Domain localDomain, const Domain globalDomain, DomDataClass dataClass, const void *buf)
DataContainer * readDomain(int32_t id, const char *name, Domain domain, DomDataClass *dataClass, bool lazyLoad=false)
void readDomainLazy(DomainData *domainData)
Domain getLocalDomain(int32_t id, const char *name)
DomainCollector(uint32_t maxFileHandles)
void appendDomain(int32_t id, const CollectionType &type, size_t count, const char *name, const Domain localDomain, const Domain globalDomain, const void *buf)