summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-02-08 22:02:29 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-02-08 22:02:29 +0000
commitbcd1eb0bc951312509cccddd5efbc19bb939e703 (patch)
treed73dd0c9ac608216614c8bd67307cac2c07ac99a /searchlib
parent1ae60f5ffb0500ae6ccd93779a28edef948cc503 (diff)
vector of string_id tends to become very large. Use mmap allocation automatically.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/tensor/streamed_value_store.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/searchlib/src/vespa/searchlib/tensor/streamed_value_store.cpp b/searchlib/src/vespa/searchlib/tensor/streamed_value_store.cpp
index 0901e643afa..2e6d771a870 100644
--- a/searchlib/src/vespa/searchlib/tensor/streamed_value_store.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/streamed_value_store.cpp
@@ -11,7 +11,6 @@
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/util/size_literals.h>
#include <vespa/vespalib/util/typify.h>
-#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/log/log.h>
LOG_SETUP(".searchlib.tensor.streamed_value_store");
@@ -22,6 +21,7 @@ using namespace vespalib::eval;
using vespalib::ConstArrayRef;
using vespalib::MemoryUsage;
using vespalib::string_id;
+using vespalib::StringIdVector;
namespace search::tensor {
@@ -61,12 +61,12 @@ struct MyFastValueView final : Value {
const ValueType &my_type;
FastValueIndex my_index;
TypedCells my_cells;
- MyFastValueView(const ValueType &type_ref, const std::vector<string_id> &handle_view, TypedCells cells, size_t num_mapped, size_t num_spaces)
+ MyFastValueView(const ValueType &type_ref, const StringIdVector &handle_view, TypedCells cells, size_t num_mapped, size_t num_spaces)
: my_type(type_ref),
my_index(num_mapped, handle_view, num_spaces),
my_cells(cells)
{
- const std::vector<string_id> &labels = handle_view;
+ const StringIdVector &labels = handle_view;
for (size_t i = 0; i < num_spaces; ++i) {
ConstArrayRef<string_id> addr(&labels[i * num_mapped], num_mapped);
my_index.map.add_mapping(FastAddrMap::hash_labels(addr));