1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 15:27:06 +01:00

Grid tensor serialisation fully implemented and tested

This commit is contained in:
2018-03-08 19:12:03 +00:00
parent caf2f6b274
commit 360cface33
6 changed files with 519 additions and 441 deletions

View File

@ -38,12 +38,6 @@ namespace Grid
template <typename U>
typename std::enable_if<!element<std::vector<U>>::is_number, void>::type
writeDefault(const std::string &s, const std::vector<U> &x);
template <typename T>
void writeDefault(const std::string &s, const iScalar<T> &t);
template <typename T, int N>
void writeDefault(const std::string &s, const iVector<T, N> &t);
template <typename T, int N>
void writeDefault(const std::string &s, const iMatrix<T, N> &t);
private:
template <typename U>
void writeSingleAttribute(const U &x, const std::string &name,
@ -154,24 +148,6 @@ namespace Grid
}
pop();
}
template <typename T>
void Hdf5Writer::writeDefault(const std::string &s, const iScalar<T> &t)
{
writeDefault(s, tensorToVec(t));
}
template <typename T, int N>
void Hdf5Writer::writeDefault(const std::string &s, const iVector<T, N> &t)
{
writeDefault(s, tensorToVec(t));
}
template <typename T, int N>
void Hdf5Writer::writeDefault(const std::string &s, const iMatrix<T, N> &t)
{
writeDefault(s, tensorToVec(t));
}
// Reader template implementation ////////////////////////////////////////////
template <typename U>