diff options
28 files changed, 48 insertions, 54 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/i_multi_value_attribute.h b/searchcommon/src/vespa/searchcommon/attribute/i_multi_value_attribute.h index 6c3a8cbd2da..cf72b3cf643 100644 --- a/searchcommon/src/vespa/searchcommon/attribute/i_multi_value_attribute.h +++ b/searchcommon/src/vespa/searchcommon/attribute/i_multi_value_attribute.h @@ -18,7 +18,7 @@ public: class Tag {}; template<typename T> - using ArrayTag = Tag<search::multivalue::Value<T>>; + using ArrayTag = Tag<T>; using ArrayEnumTag = ArrayTag<vespalib::datastore::AtomicEntryRef>; diff --git a/searchcommon/src/vespa/searchcommon/attribute/i_multi_value_read_view.h b/searchcommon/src/vespa/searchcommon/attribute/i_multi_value_read_view.h index 7d7f8831fc8..b62efb2098f 100644 --- a/searchcommon/src/vespa/searchcommon/attribute/i_multi_value_read_view.h +++ b/searchcommon/src/vespa/searchcommon/attribute/i_multi_value_read_view.h @@ -24,7 +24,7 @@ public: * @tparam T The value type of the raw data to access. */ template <typename T> -using IArrayReadView = IMultiValueReadView<multivalue::Value<T>>; +using IArrayReadView = IMultiValueReadView<T>; /** * Read view for the raw data stored in a weighted set attribute. diff --git a/searchcommon/src/vespa/searchcommon/attribute/multivalue.h b/searchcommon/src/vespa/searchcommon/attribute/multivalue.h index 7cb411fd840..2ed8309188e 100644 --- a/searchcommon/src/vespa/searchcommon/attribute/multivalue.h +++ b/searchcommon/src/vespa/searchcommon/attribute/multivalue.h @@ -7,9 +7,6 @@ namespace search::multivalue { template <typename T> -using Value = T; - -template <typename T> class WeightedValue { public: WeightedValue() noexcept : _v(), _w(1) { } diff --git a/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp b/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp index a32ab773ec1..8a702769312 100644 --- a/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp +++ b/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp @@ -26,7 +26,7 @@ using AVSP = AttributeVector::SP; namespace search { -using TestAttributeBase = MultiValueNumericAttribute< IntegerAttributeTemplate<int32_t>, multivalue::Value<int32_t> >; +using TestAttributeBase = MultiValueNumericAttribute< IntegerAttributeTemplate<int32_t>, int32_t>; class TestAttribute : public TestAttributeBase { diff --git a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp index 6abcb99c3b3..ae737b2d052 100644 --- a/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp +++ b/searchlib/src/tests/attribute/postinglistattribute/postinglistattribute_test.cpp @@ -90,7 +90,7 @@ private: Int32PostingListAttribute; typedef MultiValueNumericPostingAttribute< EnumAttribute<IntegerAttributeTemplate<int32_t> >, - multivalue::Value<IEnumStore::AtomicIndex> > + IEnumStore::AtomicIndex> Int32ArrayPostingListAttribute; typedef MultiValueNumericPostingAttribute< EnumAttribute<IntegerAttributeTemplate<int32_t> >, @@ -102,7 +102,7 @@ private: FloatPostingListAttribute; typedef MultiValueNumericPostingAttribute< EnumAttribute<FloatingPointAttributeTemplate<float> >, - multivalue::Value<IEnumStore::AtomicIndex> > + IEnumStore::AtomicIndex> FloatArrayPostingListAttribute; typedef MultiValueNumericPostingAttribute< EnumAttribute<FloatingPointAttributeTemplate<float> >, diff --git a/searchlib/src/vespa/searchlib/attribute/defines.h b/searchlib/src/vespa/searchlib/attribute/defines.h index d6e2e3d2555..defc0b39b08 100644 --- a/searchlib/src/vespa/searchlib/attribute/defines.h +++ b/searchlib/src/vespa/searchlib/attribute/defines.h @@ -4,8 +4,8 @@ #define ENUM_ATTRIBUTE(B) EnumAttribute<B> -#define MULTIVALUE_ARG(T) multivalue::Value<T> -#define MULTIVALUE_ENUM_ARG multivalue::Value<vespalib::datastore::AtomicEntryRef> +#define MULTIVALUE_ARG(T) T +#define MULTIVALUE_ENUM_ARG vespalib::datastore::AtomicEntryRef #define WEIGHTED_MULTIVALUE_ARG(T) multivalue::WeightedValue<T> #define WEIGHTED_MULTIVALUE_ENUM_ARG multivalue::WeightedValue<vespalib::datastore::AtomicEntryRef> diff --git a/searchlib/src/vespa/searchlib/attribute/flagattribute.h b/searchlib/src/vespa/searchlib/attribute/flagattribute.h index e47045f87d8..f88f46bf974 100644 --- a/searchlib/src/vespa/searchlib/attribute/flagattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/flagattribute.h @@ -6,7 +6,7 @@ namespace search { -typedef MultiValueNumericAttribute< IntegerAttributeTemplate<int8_t>, multivalue::Value<int8_t> > FlagBaseImpl; +typedef MultiValueNumericAttribute< IntegerAttributeTemplate<int8_t>, int8_t > FlagBaseImpl; template <typename B> class FlagAttributeT : public B { diff --git a/searchlib/src/vespa/searchlib/attribute/load_utils.cpp b/searchlib/src/vespa/searchlib/attribute/load_utils.cpp index 0e7a73a763d..95e5b6ef6be 100644 --- a/searchlib/src/vespa/searchlib/attribute/load_utils.cpp +++ b/searchlib/src/vespa/searchlib/attribute/load_utils.cpp @@ -10,7 +10,6 @@ #include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/util/array.hpp> -using search::multivalue::Value; using search::multivalue::WeightedValue; using vespalib::datastore::AtomicEntryRef; @@ -81,7 +80,7 @@ LoadUtils::loadUDAT(const AttributeVector& attr) #define INSTANTIATE_ARRAY(ValueType, Saver) \ -template uint32_t loadFromEnumeratedMultiValue(MultiValueMapping<Value<ValueType>> &, ReaderBase &, vespalib::ConstArrayRef<atomic_utils::NonAtomicValue_t<ValueType>>, vespalib::ConstArrayRef<uint32_t>, Saver) +template uint32_t loadFromEnumeratedMultiValue(MultiValueMapping<ValueType>&, ReaderBase &, vespalib::ConstArrayRef<atomic_utils::NonAtomicValue_t<ValueType>>, vespalib::ConstArrayRef<uint32_t>, Saver) #define INSTANTIATE_WSET(ValueType, Saver) \ template uint32_t loadFromEnumeratedMultiValue(MultiValueMapping<WeightedValue<ValueType>> &, ReaderBase &, vespalib::ConstArrayRef<atomic_utils::NonAtomicValue_t<ValueType>>, vespalib::ConstArrayRef<uint32_t>, Saver) #define INSTANTIATE_SINGLE(ValueType, Saver) \ diff --git a/searchlib/src/vespa/searchlib/attribute/multi_numeric_enum_search_context.cpp b/searchlib/src/vespa/searchlib/attribute/multi_numeric_enum_search_context.cpp index 29b6f75a3d6..71d983c7778 100644 --- a/searchlib/src/vespa/searchlib/attribute/multi_numeric_enum_search_context.cpp +++ b/searchlib/src/vespa/searchlib/attribute/multi_numeric_enum_search_context.cpp @@ -3,7 +3,7 @@ #include "multi_numeric_enum_search_context.hpp" #include <vespa/searchcommon/attribute/multivalue.h> -using ValueRef = search::multivalue::Value<vespalib::datastore::AtomicEntryRef>; +using ValueRef = vespalib::datastore::AtomicEntryRef; using WeightedValueRef = search::multivalue::WeightedValue<vespalib::datastore::AtomicEntryRef>; namespace search::attribute { diff --git a/searchlib/src/vespa/searchlib/attribute/multi_numeric_flag_search_context.cpp b/searchlib/src/vespa/searchlib/attribute/multi_numeric_flag_search_context.cpp index 1c187c5dbd6..6a0be483a55 100644 --- a/searchlib/src/vespa/searchlib/attribute/multi_numeric_flag_search_context.cpp +++ b/searchlib/src/vespa/searchlib/attribute/multi_numeric_flag_search_context.cpp @@ -45,6 +45,6 @@ MultiNumericFlagSearchContext<T, M>::createIterator(fef::TermFieldMatchData* mat } } -template class MultiNumericFlagSearchContext<int8_t, multivalue::Value<int8_t>>; +template class MultiNumericFlagSearchContext<int8_t, int8_t>; } diff --git a/searchlib/src/vespa/searchlib/attribute/multi_numeric_search_context.cpp b/searchlib/src/vespa/searchlib/attribute/multi_numeric_search_context.cpp index 249cf6217b3..b63940ad35f 100644 --- a/searchlib/src/vespa/searchlib/attribute/multi_numeric_search_context.cpp +++ b/searchlib/src/vespa/searchlib/attribute/multi_numeric_search_context.cpp @@ -3,17 +3,16 @@ #include "multi_numeric_search_context.hpp" #include <vespa/searchcommon/attribute/multivalue.h> -using search::multivalue::Value; using search::multivalue::WeightedValue; namespace search::attribute { -template class MultiNumericSearchContext<int8_t, Value<int8_t>>; -template class MultiNumericSearchContext<int16_t, Value<int16_t>>; -template class MultiNumericSearchContext<int32_t, Value<int32_t>>; -template class MultiNumericSearchContext<int64_t, Value<int64_t>>; -template class MultiNumericSearchContext<float, Value<float>>; -template class MultiNumericSearchContext<double, Value<double>>; +template class MultiNumericSearchContext<int8_t, int8_t>; +template class MultiNumericSearchContext<int16_t, int16_t>; +template class MultiNumericSearchContext<int32_t, int32_t>; +template class MultiNumericSearchContext<int64_t, int64_t>; +template class MultiNumericSearchContext<float, float>; +template class MultiNumericSearchContext<double, double>; template class MultiNumericSearchContext<int8_t, WeightedValue<int8_t>>; template class MultiNumericSearchContext<int16_t, WeightedValue<int16_t>>; diff --git a/searchlib/src/vespa/searchlib/attribute/multi_string_enum_hint_search_context.cpp b/searchlib/src/vespa/searchlib/attribute/multi_string_enum_hint_search_context.cpp index 55886ac85fa..b77e1e1fc6c 100644 --- a/searchlib/src/vespa/searchlib/attribute/multi_string_enum_hint_search_context.cpp +++ b/searchlib/src/vespa/searchlib/attribute/multi_string_enum_hint_search_context.cpp @@ -3,7 +3,7 @@ #include "multi_string_enum_hint_search_context.hpp" #include <vespa/searchcommon/attribute/multivalue.h> -using ValueRef = search::multivalue::Value<vespalib::datastore::AtomicEntryRef>; +using ValueRef = vespalib::datastore::AtomicEntryRef; using WeightedValueRef = search::multivalue::WeightedValue<vespalib::datastore::AtomicEntryRef>; namespace search::attribute { diff --git a/searchlib/src/vespa/searchlib/attribute/multi_string_enum_search_context.cpp b/searchlib/src/vespa/searchlib/attribute/multi_string_enum_search_context.cpp index 4abaf02e2e8..21a93921c24 100644 --- a/searchlib/src/vespa/searchlib/attribute/multi_string_enum_search_context.cpp +++ b/searchlib/src/vespa/searchlib/attribute/multi_string_enum_search_context.cpp @@ -3,7 +3,7 @@ #include "multi_string_enum_search_context.hpp" #include <vespa/searchcommon/attribute/multivalue.h> -using ValueRef = search::multivalue::Value<vespalib::datastore::AtomicEntryRef>; +using ValueRef = vespalib::datastore::AtomicEntryRef; using WeightedValueRef = search::multivalue::WeightedValue<vespalib::datastore::AtomicEntryRef>; namespace search::attribute { diff --git a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.cpp b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.cpp index a71bfcff04a..8a937379d7d 100644 --- a/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.cpp +++ b/searchlib/src/vespa/searchlib/attribute/multi_value_mapping.cpp @@ -9,24 +9,23 @@ #include <vespa/vespalib/datastore/buffer_type.hpp> #include <vespa/vespalib/util/array.hpp> -using search::multivalue::Value; using search::multivalue::WeightedValue; namespace search::attribute { -template class MultiValueMapping<Value<vespalib::datastore::AtomicEntryRef>>; +template class MultiValueMapping<vespalib::datastore::AtomicEntryRef>; template class MultiValueMapping<WeightedValue<vespalib::datastore::AtomicEntryRef>>; -template class MultiValueMapping<Value<int8_t>>; +template class MultiValueMapping<int8_t>; template class MultiValueMapping<WeightedValue<int8_t>>; -template class MultiValueMapping<Value<int16_t>>; +template class MultiValueMapping<int16_t>; template class MultiValueMapping<WeightedValue<int16_t>>; -template class MultiValueMapping<Value<int32_t>>; +template class MultiValueMapping<int32_t>; template class MultiValueMapping<WeightedValue<int32_t>>; -template class MultiValueMapping<Value<int64_t>>; +template class MultiValueMapping<int64_t>; template class MultiValueMapping<WeightedValue<int64_t>>; -template class MultiValueMapping<Value<float>>; +template class MultiValueMapping<float>; template class MultiValueMapping<WeightedValue<float>>; -template class MultiValueMapping<Value<double>>; +template class MultiValueMapping<double>; template class MultiValueMapping<WeightedValue<double>>; } diff --git a/searchlib/src/vespa/searchlib/attribute/multienumattribute.cpp b/searchlib/src/vespa/searchlib/attribute/multienumattribute.cpp index b0761db7e5d..c3eefaaaf93 100644 --- a/searchlib/src/vespa/searchlib/attribute/multienumattribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/multienumattribute.cpp @@ -8,7 +8,7 @@ namespace search::multienumattribute { using EnumIndex = IEnumStore::Index; using EnumIndexRemapper = IEnumStore::EnumIndexRemapper; -using Value = multivalue::Value<vespalib::datastore::AtomicEntryRef>; +using Value = vespalib::datastore::AtomicEntryRef; using WeightedValue = multivalue::WeightedValue<vespalib::datastore::AtomicEntryRef>; template <typename WeightedIndex> diff --git a/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.cpp b/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.cpp index 64358e15a3c..083f0409821 100644 --- a/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.cpp +++ b/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.cpp @@ -134,7 +134,7 @@ onSave(IAttributeSaveTarget &saveTarget) return !compaction_broke_save; } -using EnumIdxArray = multivalue::Value<vespalib::datastore::AtomicEntryRef>; +using EnumIdxArray = vespalib::datastore::AtomicEntryRef; using EnumIdxWset = multivalue::WeightedValue<vespalib::datastore::AtomicEntryRef>; template class MultiValueEnumAttributeSaver<EnumIdxArray>; diff --git a/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.h b/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.h index 137fcd24794..bd18af7acbc 100644 --- a/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.h +++ b/searchlib/src/vespa/searchlib/attribute/multienumattributesaver.h @@ -11,7 +11,7 @@ namespace search { /** * Class for saving an enumerated multivalue attribute. * - * Template argument MultiValueT is either multivalue::Value<ValueType> or + * Template argument MultiValueT is either ValueType or * multivalue::WeightedValue<ValueType> */ template <typename MultiValueT> diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.cpp b/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.cpp index eada6484a0d..0d334b5391d 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.cpp +++ b/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.cpp @@ -77,12 +77,12 @@ onSave(IAttributeSaveTarget &saveTarget) return true; } -template class MultiValueNumericAttributeSaver<multivalue::Value<int8_t>>; -template class MultiValueNumericAttributeSaver<multivalue::Value<int16_t>>; -template class MultiValueNumericAttributeSaver<multivalue::Value<int32_t>>; -template class MultiValueNumericAttributeSaver<multivalue::Value<int64_t>>; -template class MultiValueNumericAttributeSaver<multivalue::Value<float>>; -template class MultiValueNumericAttributeSaver<multivalue::Value<double>>; +template class MultiValueNumericAttributeSaver<int8_t>; +template class MultiValueNumericAttributeSaver<int16_t>; +template class MultiValueNumericAttributeSaver<int32_t>; +template class MultiValueNumericAttributeSaver<int64_t>; +template class MultiValueNumericAttributeSaver<float>; +template class MultiValueNumericAttributeSaver<double>; template class MultiValueNumericAttributeSaver<multivalue::WeightedValue<int8_t>>; template class MultiValueNumericAttributeSaver<multivalue::WeightedValue<int16_t>>; template class MultiValueNumericAttributeSaver<multivalue::WeightedValue<int32_t>>; diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.h b/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.h index df188d5ca65..d27425fba32 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.h +++ b/searchlib/src/vespa/searchlib/attribute/multinumericattributesaver.h @@ -10,7 +10,7 @@ namespace search { /* * Class for saving a multivalue attribute. * - * Template argument MultiValueT is either multivalue::Value<ValueType> or + * Template argument MultiValueT is either ValueType or * multivalue::WeightedValue<ValueType> */ template <typename MultiValueT> diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.h b/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.h index c972170f408..3bdab4cfc19 100644 --- a/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/multinumericpostattribute.h @@ -14,7 +14,7 @@ namespace search { * This class is used for both array and weighted set types. * * B: EnumAttribute<BaseClass> - * M: multivalue::Value<IEnumStore::Index> (array) or + * M: IEnumStore::Index (array) or * multivalue::WeightedValue<IEnumStore::Index> (weighted set) * M specifies the type stored in the MultiValueMapping */ diff --git a/searchlib/src/vespa/searchlib/attribute/multistringattribute.cpp b/searchlib/src/vespa/searchlib/attribute/multistringattribute.cpp index 376078763f1..641088712b3 100644 --- a/searchlib/src/vespa/searchlib/attribute/multistringattribute.cpp +++ b/searchlib/src/vespa/searchlib/attribute/multistringattribute.cpp @@ -5,7 +5,7 @@ namespace search { -template class MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::Value<vespalib::datastore::AtomicEntryRef> >; +template class MultiValueStringAttributeT<EnumAttribute<StringAttribute>, vespalib::datastore::AtomicEntryRef>; template class MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::WeightedValue<vespalib::datastore::AtomicEntryRef> >; } // namespace search diff --git a/searchlib/src/vespa/searchlib/attribute/multistringattribute.h b/searchlib/src/vespa/searchlib/attribute/multistringattribute.h index 82c3bebbf76..6f94843e1b8 100644 --- a/searchlib/src/vespa/searchlib/attribute/multistringattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/multistringattribute.h @@ -18,7 +18,7 @@ namespace search { * This class is used for both array and weighted set types. * * B: Base class: EnumAttribute<StringAttribute> - * M: multivalue::Value<IEnumStore::Index> (array) or + * M: IEnumStore::Index (array) or * multivalue::WeightedValue<IEnumStore::Index> (weighted set) */ template <typename B, typename M> @@ -108,7 +108,7 @@ public: }; -using ArrayStringAttribute = MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::Value<vespalib::datastore::AtomicEntryRef> >; +using ArrayStringAttribute = MultiValueStringAttributeT<EnumAttribute<StringAttribute>, vespalib::datastore::AtomicEntryRef>; using WeightedSetStringAttribute = MultiValueStringAttributeT<EnumAttribute<StringAttribute>, multivalue::WeightedValue<vespalib::datastore::AtomicEntryRef> >; } diff --git a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h index 17a67a67ddf..b748dcf8f61 100644 --- a/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h +++ b/searchlib/src/vespa/searchlib/attribute/multistringpostattribute.h @@ -14,7 +14,7 @@ namespace search { * This class is used for both array and weighted set types. * * B: EnumAttribute<StringAttribute> - * T: multivalue::Value<IEnumStore::Index> (array) or + * T: IEnumStore::Index (array) or * multivalue::WeightedValue<IEnumStore::Index> (weighted set) */ template <typename B, typename T> @@ -102,7 +102,7 @@ public: } }; -using ArrayStringPostingAttribute = MultiValueStringPostingAttributeT<EnumAttribute<StringAttribute>, multivalue::Value<vespalib::datastore::AtomicEntryRef> >; +using ArrayStringPostingAttribute = MultiValueStringPostingAttributeT<EnumAttribute<StringAttribute>, vespalib::datastore::AtomicEntryRef>; using WeightedSetStringPostingAttribute = MultiValueStringPostingAttributeT<EnumAttribute<StringAttribute>, multivalue::WeightedValue<vespalib::datastore::AtomicEntryRef> >; } // namespace search diff --git a/searchlib/src/vespa/searchlib/attribute/postingchange.cpp b/searchlib/src/vespa/searchlib/attribute/postingchange.cpp index 62d6e3364a2..c3e6d344fb0 100644 --- a/searchlib/src/vespa/searchlib/attribute/postingchange.cpp +++ b/searchlib/src/vespa/searchlib/attribute/postingchange.cpp @@ -330,7 +330,7 @@ template class PostingChange<AttributeWeightPosting>; typedef PostingChange<vespalib::btree::BTreeKeyData<unsigned int, int> > WeightedPostingChange; typedef std::map<EnumPostingPair, WeightedPostingChange> WeightedPostingChangeMap; typedef multivalue::WeightedValue<AtomicEntryRef> WeightedIndex; -typedef multivalue::Value<AtomicEntryRef> ValueIndex; +typedef AtomicEntryRef ValueIndex; using WeightedMultiValueMapping = attribute::MultiValueMapping<WeightedIndex>; using ValueMultiValueMapping = attribute::MultiValueMapping<ValueIndex>; diff --git a/searchlib/src/vespa/searchlib/features/attributefeature.cpp b/searchlib/src/vespa/searchlib/features/attributefeature.cpp index 2349e8f1398..47445e9e8ee 100644 --- a/searchlib/src/vespa/searchlib/features/attributefeature.cpp +++ b/searchlib/src/vespa/searchlib/features/attributefeature.cpp @@ -344,7 +344,7 @@ struct MultiValueExecutorCreator { bool handle(const IAttributeVector *attribute) { auto multi_value_attribute = attribute->as_multi_value_attribute(); if (multi_value_attribute != nullptr) { - _array_read_view = multi_value_attribute->as_read_view(attribute::IMultiValueAttribute::Tag<multivalue::Value<typename T::BaseType>>()); + _array_read_view = multi_value_attribute->as_read_view(attribute::IMultiValueAttribute::Tag<typename T::BaseType>()); } return _array_read_view != nullptr; } diff --git a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp index 3cef5d06043..0b4e09dde0d 100644 --- a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp @@ -575,7 +575,7 @@ createForDirectArrayImpl(const IAttributeVector * attribute, } const A * iattr = dynamic_cast<const A *>(attribute); using T = typename A::BaseType; - using VT = multivalue::Value<T>; + using VT = T; auto array_read_view = get_multi_value_read_view<VT>(*attribute); if (indexes.empty()) { if (array_read_view != nullptr) { diff --git a/searchlib/src/vespa/searchlib/features/dotproductfeature.h b/searchlib/src/vespa/searchlib/features/dotproductfeature.h index 4e94c9bce86..8ce545bd23d 100644 --- a/searchlib/src/vespa/searchlib/features/dotproductfeature.h +++ b/searchlib/src/vespa/searchlib/features/dotproductfeature.h @@ -180,7 +180,7 @@ namespace array { template <typename BaseType> class DotProductExecutorBase : public fef::FeatureExecutor { public: - using AT = multivalue::Value<BaseType>; + using AT = BaseType; using V = std::vector<BaseType>; private: const vespalib::hwaccelrated::IAccelrated & _multiplier; diff --git a/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp b/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp index 739d0f01cee..e69c3703c2c 100644 --- a/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp @@ -65,7 +65,7 @@ RawExecutor<BaseType>::RawExecutor(const ArrayReadView* array_read_view, const I namespace { template <typename T> -inline T get_array_element_value(const multivalue::Value<T>& value) noexcept { return multivalue::get_value(value); } +inline T get_array_element_value(const T& value) noexcept { return multivalue::get_value(value); } template <typename T> inline T get_array_element_value(const search::attribute::WeightedType<T>& value) noexcept { return value.value(); } @@ -144,7 +144,7 @@ template<typename BaseType, typename V> FeatureExecutor & selectTypedExecutor(const IAttributeVector *attribute, V && vector, vespalib::Stash &stash) { if (!attribute->isImported()) { - using VT = multivalue::Value<BaseType>; + using VT = BaseType; auto multi_value_attribute = attribute->as_multi_value_attribute(); if (multi_value_attribute != nullptr) { auto array_read_view = multi_value_attribute->as_read_view(attribute::IMultiValueAttribute::Tag<VT>()); |