aboutsummaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-10-16 10:15:20 +0000
committerArne Juul <arnej@verizonmedia.com>2020-10-16 10:15:20 +0000
commita7f2465c1f9de50572b4a2aecb538b7fa911f6eb (patch)
treed69374bce9a95bc7928ff073b8e8a5ea425bda3b /eval
parent29f826338a8af1406e0e142dcd182ad4268f0040 (diff)
fixups after review:
* delete copy constructor * rename helper method
Diffstat (limited to 'eval')
-rw-r--r--eval/src/vespa/eval/tensor/sparse/sparse_tensor_index.cpp4
-rw-r--r--eval/src/vespa/eval/tensor/sparse/sparse_tensor_index.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/eval/src/vespa/eval/tensor/sparse/sparse_tensor_index.cpp b/eval/src/vespa/eval/tensor/sparse/sparse_tensor_index.cpp
index b3b48d4cb13..292d7995ab4 100644
--- a/eval/src/vespa/eval/tensor/sparse/sparse_tensor_index.cpp
+++ b/eval/src/vespa/eval/tensor/sparse/sparse_tensor_index.cpp
@@ -180,7 +180,7 @@ SparseTensorValueAllMappings::next_result(ConstArrayRef<vespalib::stringref*> ad
//-----------------------------------------------------------------------------
size_t
-SparseTensorIndex::needed_memory_for(const SparseTensorIndex &other) {
+SparseTensorIndex::wanted_stash_size_for(const SparseTensorIndex &other) {
auto mem = other._stash.get_memory_usage();
size_t mem_use = mem.usedBytes();
if (mem_use == 0) {
@@ -208,7 +208,7 @@ SparseTensorIndex::SparseTensorIndex(size_t stash_size, const SparseTensorIndex
SparseTensorIndex
SparseTensorIndex::shrunk_copy() const
{
- size_t want_mem = needed_memory_for(*this);
+ size_t want_mem = wanted_stash_size_for(*this);
return SparseTensorIndex(want_mem, *this);
}
diff --git a/eval/src/vespa/eval/tensor/sparse/sparse_tensor_index.h b/eval/src/vespa/eval/tensor/sparse/sparse_tensor_index.h
index c762c84e3d3..71f31eaf4c3 100644
--- a/eval/src/vespa/eval/tensor/sparse/sparse_tensor_index.h
+++ b/eval/src/vespa/eval/tensor/sparse/sparse_tensor_index.h
@@ -21,6 +21,7 @@ public:
explicit SparseTensorIndex(size_t num_mapped_dims_in);
SparseTensorIndex copy() const;
SparseTensorIndex shrunk_copy() const;
+ SparseTensorIndex(const SparseTensorIndex &) = delete;
SparseTensorIndex(SparseTensorIndex && index_in) = default;
~SparseTensorIndex();
// Index API
@@ -40,7 +41,7 @@ private:
Stash _stash;
IndexMap _map;
size_t _num_mapped_dims;
- static size_t needed_memory_for(const SparseTensorIndex &other);
+ static size_t wanted_stash_size_for(const SparseTensorIndex &other);
SparseTensorIndex(size_t stash_size, const SparseTensorIndex &other);
};