1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Hadrons: A2A matrix IO fix

This commit is contained in:
Antonin Portelli 2018-09-02 01:46:22 +01:00
parent 26cee605b8
commit 6f09df0daf
2 changed files with 5 additions and 5 deletions

View File

@ -80,10 +80,10 @@ void A2AMatrixIo<T, MetadataType>::initFile(const MetadataType &d)
}
// create the dataset
Hdf5Writer writer(filename_);
Hdf5Reader reader(filename_);
push(writer, dataname_);
auto &group = writer.getGroup();
push(reader, dataname_);
auto &group = reader.getGroup();
plist.setChunk(chunk.size(), chunk.data());
dataset = group.createDataSet("data", Hdf5Type<T>::type(), dataspace, plist);
#else

View File

@ -102,7 +102,7 @@ private:
// IO
std::string ioname(unsigned int m, unsigned int g) const;
std::string filename(unsigned int m, unsigned int g) const;
void saveBlock(MF_IO_TYPE *data, IoHelper &h, unsigned int i, unsigned int j);
void saveBlock(const MF_IO_TYPE *data, IoHelper &h, unsigned int i, unsigned int j);
private:
bool hasPhase_{false};
std::string momphName_;
@ -416,7 +416,7 @@ std::string TA2AMesonField<FImpl>::filename(unsigned int m, unsigned int g) cons
}
template <typename FImpl>
void TA2AMesonField<FImpl>::saveBlock(MF_IO_TYPE *data, IoHelper &h,
void TA2AMesonField<FImpl>::saveBlock(const MF_IO_TYPE *data, IoHelper &h,
unsigned int i, unsigned int j)
{
if ((i == 0) and (j == 0))