aboutsummaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-12-19 19:28:37 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-12-19 19:29:10 +0100
commit6fa1b6e6bf6453c4dedddb7a63f596c6ac914059 (patch)
treedd5fdb7f374b28a96fec225afb132136c6c73203 /eval
parentd34215a65829e508b2acb4e9037c98872b98268b (diff)
Use 2inN modulator instead of prime number modulator to avoid expensive div
Diffstat (limited to 'eval')
-rw-r--r--eval/src/vespa/eval/tensor/sparse/sparse_tensor.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/eval/src/vespa/eval/tensor/sparse/sparse_tensor.h b/eval/src/vespa/eval/tensor/sparse/sparse_tensor.h
index 78c69bd5e43..3eeb122f48c 100644
--- a/eval/src/vespa/eval/tensor/sparse/sparse_tensor.h
+++ b/eval/src/vespa/eval/tensor/sparse/sparse_tensor.h
@@ -21,7 +21,8 @@ namespace vespalib::tensor {
class SparseTensor : public Tensor
{
public:
- using Cells = vespalib::hash_map<SparseTensorAddressRef, double>;
+ using Cells = hash_map<SparseTensorAddressRef, double, hash<SparseTensorAddressRef>,
+ std::equal_to<SparseTensorAddressRef>, hashtable_base::and_modulator>;
static constexpr size_t STASH_CHUNK_SIZE = 16384u;