diff options
6 files changed, 6 insertions, 9 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; diff --git a/vespalib/src/vespa/vespalib/util/arrayref.h b/vespalib/src/vespa/vespalib/util/arrayref.h index cbfea3c21bd..88dc501370c 100644 --- a/vespalib/src/vespa/vespalib/util/arrayref.h +++ b/vespalib/src/vespa/vespalib/util/arrayref.h @@ -1,7 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include "array.h" #include "small_vector.h" #include <vector> @@ -20,7 +19,6 @@ public: ArrayRef(std::vector<T, A> & v) noexcept : _v(v.data()), _sz(v.size()) { } template<size_t N> ArrayRef(SmallVector<T, N> &v) noexcept : _v(v.data()), _sz(v.size()) { } - ArrayRef(Array<T> &v) noexcept : _v(v.data()), _sz(v.size()) { } T & operator [] (size_t i) noexcept { return _v[i]; } const T & operator [] (size_t i) const noexcept { return _v[i]; } T * data() noexcept { return _v; } @@ -43,7 +41,6 @@ public: template<size_t N> ConstArrayRef(const SmallVector<T, N> &v) noexcept : _v(v.data()), _sz(v.size()) { } ConstArrayRef(const ArrayRef<T> & v) noexcept : _v(v.data()), _sz(v.size()) { } - ConstArrayRef(const Array<T> &v) noexcept : _v(v.data()), _sz(v.size()) { } constexpr ConstArrayRef() noexcept : _v(nullptr), _sz(0) {} const T & operator [] (size_t i) const noexcept { return _v[i]; } [[nodiscard]] size_t size() const noexcept { return _sz; } diff --git a/vespalib/src/vespa/vespalib/util/small_vector.h b/vespalib/src/vespa/vespalib/util/small_vector.h index 54711623440..cf9910e24b5 100644 --- a/vespalib/src/vespa/vespalib/util/small_vector.h +++ b/vespalib/src/vespa/vespalib/util/small_vector.h @@ -4,10 +4,8 @@ #include "alloc.h" #include "traits.h" -#include <string.h> -#include <cstdint> +#include <cstring> #include <cassert> -#include <memory> #include <iterator> namespace vespalib { |