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

Implemented specialisations of NamedTensor as derived classes, however this suffers a number of problems:

1) virtual functions not available in base class constructor where I'd like to use them - e.g. IndexNames
2) Must define new constructors in derived classes
... so the specialisations are fatter than I'd like. Would prefer to revert to specifying tensor name and index name defaults in template
This commit is contained in:
Michael Marshall
2019-11-08 11:55:00 +00:00
parent 65aa54804e
commit f8e1941327
5 changed files with 102 additions and 68 deletions

View File

@ -35,13 +35,23 @@ using namespace MDistil;
template class Grid::Hadrons::MDistil::TPerambulator<FIMPL>;
BEGIN_HADRONS_NAMESPACE
// Global constants for distillation
const std::string Grid::Hadrons::MDistil::PerambTensorName{ "Perambulator" };
const std::array<std::string, 6> Grid::Hadrons::MDistil::PerambIndexNames{"nT", "nVec", "LI", "nNoise", "nT_inv", "SI"};
#ifdef HAVE_HDF5
extern const std::string Grid::Hadrons::NamedTensorFileExtension{".h5"};
extern const std::string NamedTensorFileExtension{".h5"};
#else
extern const std::string Grid::Hadrons::NamedTensorFileExtension{".dat"};
extern const std::string NamedTensorFileExtension{".dat"};
#endif
BEGIN_MODULE_NAMESPACE(MDistil)
const std::string NoiseTensor::Name_{"Noises"};
const std::vector<std::string> NoiseTensor::DefaultIndexNames_{"nNoise", "nT", "nVec", "nS"};
const std::string PerambTensor::Name_{"Perambulator"};
const std::vector<std::string> PerambTensor::DefaultIndexNames_{"nT", "nVec", "LI", "nNoise", "nT_inv", "SI"};
END_MODULE_NAMESPACE
END_HADRONS_NAMESPACE