diff options
author | Geir Storli <geirst@oath.com> | 2018-04-19 11:16:23 +0000 |
---|---|---|
committer | Geir Storli <geirst@oath.com> | 2018-04-19 11:56:12 +0000 |
commit | 939a0c130bbcea1cc5fb743711c7a021f467fcae (patch) | |
tree | 3108f9e6fee7d92554a868af14c42c2d6008e6fa /searchlib | |
parent | bd08540974dc5182c8f634c3160cf85a8ed6ae04 (diff) |
Change ImportedTensorAttributeVector to no longer implement ITensorAttribute API.
All read access happens through short-lived ImportedTensorAttributeVectorReadGuard.
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.cpp | 24 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.h | 12 |
2 files changed, 4 insertions, 32 deletions
diff --git a/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.cpp b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.cpp index 90c9c9b7f33..c84f61ccb70 100644 --- a/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.cpp +++ b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.cpp @@ -44,28 +44,4 @@ ImportedTensorAttributeVector::makeReadGuard(bool stableEnumGuard) const return std::make_unique<ImportedTensorAttributeVectorReadGuard>(*this, stableEnumGuard); } -std::unique_ptr<Tensor> -ImportedTensorAttributeVector::getTensor(uint32_t docId) const -{ - return _target_tensor_attribute.getTensor(_reference_attribute->getReferencedLid(docId)); -} - -std::unique_ptr<Tensor> -ImportedTensorAttributeVector::getEmptyTensor() const -{ - return _target_tensor_attribute.getEmptyTensor(); -} - -void -ImportedTensorAttributeVector::getTensor(uint32_t docId, vespalib::tensor::MutableDenseTensorView &tensor) const -{ - _target_tensor_attribute.getTensor(_reference_attribute->getReferencedLid(docId), tensor); -} - -vespalib::eval::ValueType -ImportedTensorAttributeVector::getTensorType() const -{ - return _target_tensor_attribute.getTensorType(); -} - } diff --git a/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.h b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.h index 93155a2defc..be946066363 100644 --- a/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.h +++ b/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.h @@ -3,15 +3,15 @@ #pragma once #include <vespa/searchlib/attribute/imported_attribute_vector.h> -#include "i_tensor_attribute.h" namespace search::tensor { +class ITensorAttribute; + /** * Attribute vector for imported tensor attributes. */ -class ImportedTensorAttributeVector : public attribute::ImportedAttributeVector, - public ITensorAttribute +class ImportedTensorAttributeVector : public attribute::ImportedAttributeVector { using ReferenceAttribute = attribute::ReferenceAttribute; using BitVectorSearchCache = attribute::BitVectorSearchCache; @@ -30,10 +30,6 @@ public: ~ImportedTensorAttributeVector(); virtual std::unique_ptr<attribute::AttributeReadGuard> makeReadGuard(bool stableEnumGuard) const override; - virtual std::unique_ptr<Tensor> getTensor(uint32_t docId) const override; - virtual std::unique_ptr<Tensor> getEmptyTensor() const override; - virtual void getTensor(uint32_t docId, vespalib::tensor::MutableDenseTensorView &tensor) const override; - virtual vespalib::eval::ValueType getTensorType() const override; }; -} // namespace search::tensor +} |