Changeset a4fee13 for GenericIO.h
- Timestamp:
- 10/09/15 19:14:02 (9 years ago)
- Branches:
- master, pympi
- Children:
- 8f0a211
- Parents:
- 406b50a
- git-author:
- Hal Finkel <hfinkel@…> (10/09/15 19:14:02)
- git-committer:
- Hal Finkel <hfinkel@…> (10/09/15 19:14:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GenericIO.h
rda65757 ra4fee13 288 288 int readGlobalRankNumber(int EffRank = -1); 289 289 290 void readData(int EffRank = -1, bool PrintStats = true, bool CollStats = true);290 void readData(int EffRank = -1, bool PrintStats = true, bool CollStats = true); 291 291 292 292 void close() { … … 319 319 } 320 320 #endif 321 322 private: 323 // Implementation functions templated on the Endianness of the underlying 324 // data. 325 326 #ifndef GENERICIO_NO_MPI 327 template <bool IsBigEndian> 328 void write(); 329 #endif 330 331 template <bool IsBigEndian> 332 void readHeaderLeader(void *GHPtr, bool MustMatch, int SplitNRanks, 333 std::string &LocalFileName, uint64_t &HeaderSize, 334 std::vector<char> &Header); 335 336 template <bool IsBigEndian> 337 int readNRanks(); 338 339 template <bool IsBigEndian> 340 void readDims(int Dims[3]); 341 342 template <bool IsBigEndian> 343 uint64_t readTotalNumElems(); 344 345 template <bool IsBigEndian> 346 void readPhysOrigin(double Origin[3]); 347 348 template <bool IsBigEndian> 349 void readPhysScale(double Scale[3]); 350 351 template <bool IsBigEndian> 352 int readGlobalRankNumber(int EffRank); 353 354 template <bool IsBigEndian> 355 size_t readNumElems(int EffRank); 356 357 template <bool IsBigEndian> 358 void readCoords(int Coords[3], int EffRank); 359 360 template <bool IsBigEndian> 361 void readData(int EffRank, bool PrintStats, bool CollStats); 362 363 template <bool IsBigEndian> 364 void getVariableInfo(std::vector<VariableInfo> &VI); 321 365 322 366 protected: … … 378 422 } 379 423 424 bool isBigEndian() { 425 return CountedFH ? CountedFH->IsBigEndian : false; 426 } 427 428 void setIsBigEndian(bool isBE) { 429 CountedFH->IsBigEndian = isBE; 430 } 431 380 432 void allocate() { 381 433 close(); … … 393 445 394 446 struct FHWCnt { 395 FHWCnt() : GFIO(0), Cnt(1) {}447 FHWCnt() : GFIO(0), Cnt(1), IsBigEndian(false) {} 396 448 397 449 ~FHWCnt() { … … 411 463 // Used for reading 412 464 std::vector<char> HeaderCache; 465 bool IsBigEndian; 413 466 }; 414 467
Note: See TracChangeset
for help on using the changeset viewer.