diff options
Diffstat (limited to 'eval')
-rw-r--r-- | eval/src/vespa/eval/tensor/sparse/sparse_tensor_address_ref.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/eval/src/vespa/eval/tensor/sparse/sparse_tensor_address_ref.h b/eval/src/vespa/eval/tensor/sparse/sparse_tensor_address_ref.h index 321690085be..91a5307d9d0 100644 --- a/eval/src/vespa/eval/tensor/sparse/sparse_tensor_address_ref.h +++ b/eval/src/vespa/eval/tensor/sparse/sparse_tensor_address_ref.h @@ -3,14 +3,10 @@ #pragma once #include <vespa/vespalib/util/stash.h> +#include <vespa/vespalib/xxhash/xxhash.h> #include <cstring> -namespace vespalib { - -// From vespalib/util/hashmap.h -size_t hashValue(const void * buf, size_t sz); - -namespace tensor { +namespace vespalib::tensor { /** * A reference to a compact sparse immutable address to a tensor cell. @@ -44,7 +40,7 @@ public: uint32_t hash() const { return _hash; } - uint32_t calcHash() const { return hashValue(_start, _size); } + uint32_t calcHash() const { return XXH32(_start, _size, 0); } bool operator<(const SparseTensorAddressRef &rhs) const { size_t minSize = std::min(_size, rhs._size); @@ -67,5 +63,4 @@ public: uint32_t size() const { return _size; } }; -} // namespace vespalib::tensor -} // namespace vespalib +} |