From 6d34f01d95c570ee940dd61703ae2f5cb53006eb Mon Sep 17 00:00:00 2001 From: Bernd Schwarzenbacher Date: Mon, 21 Oct 2019 00:12:29 +0200 Subject: [PATCH] Add a HashValue> for ParallelHashTable --- libsrc/core/hashtable.hpp | 8 +++++++- libsrc/general/hashtabl.hpp | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libsrc/core/hashtable.hpp b/libsrc/core/hashtable.hpp index 6e768915..36fb9f77 100644 --- a/libsrc/core/hashtable.hpp +++ b/libsrc/core/hashtable.hpp @@ -827,7 +827,13 @@ namespace ngcore return ost; } - + template + 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 NETGEN_INLINE size_t HashValue (const INT<2,TI> ind) { diff --git a/libsrc/general/hashtabl.hpp b/libsrc/general/hashtabl.hpp index a08466db..5c5fe4f8 100644 --- a/libsrc/general/hashtabl.hpp +++ b/libsrc/general/hashtabl.hpp @@ -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 _hash, NgFlatArray _cont) : size(_hash.Size()), used(0), hash(_hash.Size(), _hash.Addr(0)), cont(_cont.Size(), _cont.Addr(0)) {