Add a HashValue<INT<3>> for ParallelHashTable

This commit is contained in:
Bernd Schwarzenbacher 2019-10-21 00:12:29 +02:00
parent 495a6eddf7
commit 6d34f01d95
2 changed files with 7 additions and 2 deletions

View File

@ -827,6 +827,12 @@ namespace ngcore
return ost;
}
template <typename TI>
NETGEN_INLINE size_t HashValue (const INT<3,TI> ind)
{
INT<3,size_t> lind = ind;
return 113*lind[0]+59*lind[1]+lind[2];
}
template <typename TI>
NETGEN_INLINE size_t HashValue (const INT<2,TI> ind)

View File

@ -1390,7 +1390,6 @@ inline size_t HashValue (INDEX_2 i2, size_t size) { return (113*size_t(i2[0])+si
ClosedHashTable (ClosedHashTable && ht2) = default;
// who needs that ?
ClosedHashTable (NgFlatArray<T_HASH> _hash, NgFlatArray<T> _cont)
: size(_hash.Size()), used(0), hash(_hash.Size(), _hash.Addr(0)), cont(_cont.Size(), _cont.Addr(0))
{