mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-12 20:27:06 +01:00
Merge branch 'feature/distil' of https://github.com/mmphys/Grid into feature/distil
This commit is contained in:
@ -86,7 +86,7 @@ void ioTest(const std::string &filename, const O &object, const std::string &nam
|
||||
// writer needs to be destroyed so that writing physically happens
|
||||
{
|
||||
W writer(filename);
|
||||
|
||||
writer.setPrecision(std::numeric_limits<double>::digits10 + 1);
|
||||
write(writer, tag , object);
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ typedef Eigen::Tensor<TestScalar, 3, Eigen::StorageOptions::RowMajor> TensorRank
|
||||
typedef Eigen::TensorFixedSize<TestScalar, Eigen::Sizes<9,4,2>, Eigen::StorageOptions::RowMajor> Tensor_9_4_2;
|
||||
typedef std::vector<Tensor_9_4_2> aTensor_9_4_2;
|
||||
typedef Eigen::TensorFixedSize<SpinColourVector, Eigen::Sizes<6,5>> LSCTensor;
|
||||
#ifdef DEBUG
|
||||
#ifndef DEBUG
|
||||
typedef Eigen::TensorFixedSize<iMatrix<iVector<iMatrix<iVector<LorentzColourMatrix,5>,2>,7>,3>, Eigen::Sizes<2,4,11,10,9>, Eigen::StorageOptions::RowMajor> LCMTensor;
|
||||
#endif
|
||||
|
||||
@ -141,14 +141,14 @@ public:
|
||||
, tensorRank3(7,3,2)
|
||||
, atensor_9_4_2(3)
|
||||
{
|
||||
Grid_complex<double> Flag{1,-3.1415927};
|
||||
//Grid_complex<double> Flag{1,-3.1415927}; // Gives errors on readback for text types
|
||||
Grid_complex<double> Flag{1,-1};
|
||||
SequentialInit(Perambulator, Flag);
|
||||
SequentialInit(Perambulator2, Flag);
|
||||
SequentialInit(tensorRank5UShort);
|
||||
SequentialInit(tensorRank3, Flag);
|
||||
SequentialInit(tensor_9_4_2, Flag);
|
||||
for( auto &t : atensor_9_4_2 )
|
||||
SequentialInit(t, Flag);
|
||||
for( auto &t : atensor_9_4_2 ) SequentialInit(t, Flag);
|
||||
SequentialInit( MyLSCTensor );
|
||||
}
|
||||
};
|
||||
@ -193,7 +193,7 @@ void EigenHdf5IOTest(const char * pszExtension)
|
||||
}
|
||||
TensorWriteRead ( LSCTensor )
|
||||
TensorWriteReadLarge( PerambIOTestClass )
|
||||
#ifdef DEBUG
|
||||
#ifndef DEBUG
|
||||
std::cout << "sizeof( LCMTensor ) = " << sizeof( LCMTensor ) / 1024 / 1024 << " MB" << std::endl;
|
||||
TensorWriteReadLarge ( LCMTensor )
|
||||
// Also write > 4GB of complex numbers (I suspect this will fail inside Hdf5)
|
||||
@ -297,6 +297,10 @@ int main(int argc,char **argv)
|
||||
#endif
|
||||
std::cout << "\n==== detailed binary tensor tests (Grid::EigenIO)" << std::endl;
|
||||
EigenHdf5IOTest<BinaryWriter, BinaryReader>(".bin");
|
||||
std::cout << "\n==== detailed text tensor tests (Grid::EigenIO)" << std::endl;
|
||||
EigenHdf5IOTest<TextWriter, TextReader>(".dat");
|
||||
std::cout << "\n==== detailed xml tensor tests (Grid::EigenIO)" << std::endl;
|
||||
EigenHdf5IOTest<XmlWriter, XmlReader>(".xml");
|
||||
|
||||
std::cout << "\n==== vector flattening/reconstruction" << std::endl;
|
||||
typedef std::vector<std::vector<std::vector<double>>> vec3d;
|
||||
|
Reference in New Issue
Block a user