From 8792ff6439ee2a08625c592f3d24d75617d70b27 Mon Sep 17 00:00:00 2001 From: paboyle Date: Sat, 24 Feb 2018 22:22:43 +0000 Subject: [PATCH] Coordinate handling gpu ready --- lib/parallelIO/BinaryIO.h | 20 ++++++++++---------- lib/parallelIO/IldgIO.h | 2 +- lib/parallelIO/IldgIOtypes.h | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/parallelIO/BinaryIO.h b/lib/parallelIO/BinaryIO.h index ee7c8a61..6e3c95eb 100644 --- a/lib/parallelIO/BinaryIO.h +++ b/lib/parallelIO/BinaryIO.h @@ -133,13 +133,13 @@ public: if (fbuf.size()==1) { lsites=1; } - std::vector local_vol =grid->LocalDimensions(); - std::vector local_start =grid->LocalStarts(); - std::vector global_vol =grid->FullDimensions(); + Coordinate local_vol =grid->LocalDimensions(); + Coordinate local_start =grid->LocalStarts(); + Coordinate global_vol =grid->FullDimensions(); thread_region { - std::vector coor(nd); + Coordinate coor(nd); uint32_t scidac_csuma_thr=0; uint32_t scidac_csumb_thr=0; uint32_t site_crc=0; @@ -269,13 +269,13 @@ public: int nrank = grid->ProcessorCount(); int myrank = grid->ThisRank(); - std::vector psizes = grid->ProcessorGrid(); - std::vector pcoor = grid->ThisProcessorCoor(); - std::vector gLattice= grid->GlobalDimensions(); - std::vector lLattice= grid->LocalDimensions(); + Coordinate psizes = grid->ProcessorGrid(); + Coordinate pcoor = grid->ThisProcessorCoor(); + Coordinate gLattice= grid->GlobalDimensions(); + Coordinate lLattice= grid->LocalDimensions(); - std::vector lStart(ndim); - std::vector gStart(ndim); + Coordinate lStart(ndim); + Coordinate gStart(ndim); // Flatten the file uint64_t lsites = grid->lSites(); diff --git a/lib/parallelIO/IldgIO.h b/lib/parallelIO/IldgIO.h index 813a89ed..2e12b366 100644 --- a/lib/parallelIO/IldgIO.h +++ b/lib/parallelIO/IldgIO.h @@ -593,7 +593,7 @@ public: GridBase *grid = Umu.Grid(); - std::vector dims = Umu.Grid()->FullDimensions(); + auto dims = Umu.Grid()->FullDimensions(); assert(dims.size()==4); diff --git a/lib/parallelIO/IldgIOtypes.h b/lib/parallelIO/IldgIOtypes.h index 065397f4..87b50f6b 100644 --- a/lib/parallelIO/IldgIOtypes.h +++ b/lib/parallelIO/IldgIOtypes.h @@ -91,7 +91,7 @@ public: return dimensions; } - void setDimensions(std::vector dimensions) { + void setDimensions(Coordinate dimensions) { char delimiter = ' '; std::stringstream stream; for(int i=0;i