diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-05-06 11:26:44 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-05-06 11:26:44 +0000 |
commit | e260d3ecd2634359abdb2fe90578284ed1bc0fd6 (patch) | |
tree | ebfa2e406ae935769bc41c8e36982bc2562140f3 /searchlib | |
parent | 929b55c8c3cc4702d1e32711c8943c8e3c949505 (diff) |
Prefer std::vector over vespalib::Array
Diffstat (limited to 'searchlib')
4 files changed, 5 insertions, 3 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/extendable_string_array_multi_value_read_view.h b/searchlib/src/vespa/searchlib/attribute/extendable_string_array_multi_value_read_view.h index 6d8c64a706d..1104d749886 100644 --- a/searchlib/src/vespa/searchlib/attribute/extendable_string_array_multi_value_read_view.h +++ b/searchlib/src/vespa/searchlib/attribute/extendable_string_array_multi_value_read_view.h @@ -3,6 +3,7 @@ #pragma once #include <vespa/searchcommon/attribute/i_multi_value_read_view.h> +#include <vespa/vespalib/util/array.h> namespace search::attribute { diff --git a/searchlib/src/vespa/searchlib/attribute/extendable_string_weighted_set_multi_value_read_view.h b/searchlib/src/vespa/searchlib/attribute/extendable_string_weighted_set_multi_value_read_view.h index 1d631b06c1c..2c55452faaf 100644 --- a/searchlib/src/vespa/searchlib/attribute/extendable_string_weighted_set_multi_value_read_view.h +++ b/searchlib/src/vespa/searchlib/attribute/extendable_string_weighted_set_multi_value_read_view.h @@ -3,6 +3,7 @@ #pragma once #include <vespa/searchcommon/attribute/i_multi_value_read_view.h> +#include <vespa/vespalib/util/array.h> namespace search::attribute { diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_graph.cpp b/searchlib/src/vespa/searchlib/tensor/hnsw_graph.cpp index 3049b643709..427e6700e8c 100644 --- a/searchlib/src/vespa/searchlib/tensor/hnsw_graph.cpp +++ b/searchlib/src/vespa/searchlib/tensor/hnsw_graph.cpp @@ -28,7 +28,7 @@ HnswGraph::make_node_for_document(uint32_t docid, uint32_t num_levels) // A document cannot be added twice. assert(!get_node_ref(docid).valid()); // Note: The level array instance lives as long as the document is present in the index. - vespalib::Array<AtomicEntryRef> levels(num_levels, AtomicEntryRef()); + std::vector<AtomicEntryRef> levels(num_levels, AtomicEntryRef()); auto node_ref = nodes.add(levels); node_refs[docid].store_release(node_ref); if (docid >= node_refs_size.load(std::memory_order_relaxed)) { diff --git a/searchlib/src/vespa/searchlib/tensor/hnsw_index.h b/searchlib/src/vespa/searchlib/tensor/hnsw_index.h index f607af587b5..48f4cb9d494 100644 --- a/searchlib/src/vespa/searchlib/tensor/hnsw_index.h +++ b/searchlib/src/vespa/searchlib/tensor/hnsw_index.h @@ -17,6 +17,7 @@ #include <vespa/vespalib/datastore/entryref.h> #include <vespa/vespalib/util/rcuvector.h> #include <vespa/vespalib/util/reusable_set_pool.h> +#include <vespa/vespalib/stllike/allocator.h> namespace search::tensor { @@ -87,10 +88,9 @@ protected: using LinkStore = HnswGraph::LinkStore; using LinkArrayRef = HnswGraph::LinkArrayRef; - using LinkArray = vespalib::Array<uint32_t>; + using LinkArray = std::vector<uint32_t, vespalib::allocator_large<uint32_t>>; using LevelArrayRef = HnswGraph::LevelArrayRef; - using LevelArray = vespalib::Array<AtomicEntryRef>; using TypedCells = vespalib::eval::TypedCells; |