1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-12-20 04:34:29 +00:00

Hadrons: grids stored with hash of SIMD type (for mixed-precision setups)

This commit is contained in:
2018-09-10 15:31:39 +01:00
parent 7b6b712565
commit 63c21767ba
4 changed files with 253 additions and 148 deletions

View File

@@ -155,14 +155,28 @@ const std::type_info * typeIdPt(const T &x)
return &typeid(x);
}
std::string typeName(const std::type_info *info);
template <typename T>
const std::type_info * typeIdPt(void)
{
return &typeid(T);
}
size_t typeHash(const std::type_info *info);
template <typename T>
size_t typeHash(const T &x)
{
return typeHash(typeIdPt(x));
}
template <typename T>
size_t typeHash(void)
{
return typeHash(typeIdPt<T>());
}
std::string typeName(const std::type_info *info);
template <typename T>
std::string typeName(const T &x)
{