aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/tensor/imported_tensor_attribute_vector.h
blob: 853b2b54beb7aac90faeb2b80e9028f08f27c475 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/searchlib/attribute/imported_attribute_vector.h>

namespace search::tensor {

class ITensorAttribute;

/**
 * Attribute vector for imported tensor attributes.
 */
class ImportedTensorAttributeVector : public attribute::ImportedAttributeVector
{
    using ReferenceAttribute = attribute::ReferenceAttribute;
    using BitVectorSearchCache = attribute::BitVectorSearchCache;

public:
    ImportedTensorAttributeVector(vespalib::stringref name,
                                  std::shared_ptr<ReferenceAttribute> reference_attribute,
                                  std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
                                  std::shared_ptr<attribute::ReadableAttributeVector> target_attribute,
                                  std::shared_ptr<const IDocumentMetaStoreContext> target_document_meta_store,
                                  bool use_search_cache);
    ImportedTensorAttributeVector(vespalib::stringref name,
                                  std::shared_ptr<ReferenceAttribute> reference_attribute,
                                  std::shared_ptr<IDocumentMetaStoreContext> document_meta_store,
                                  std::shared_ptr<attribute::ReadableAttributeVector> target_attribute,
                                  std::shared_ptr<const IDocumentMetaStoreContext> target_document_meta_store,
                                  std::shared_ptr<BitVectorSearchCache> search_cache);
    ~ImportedTensorAttributeVector() override;

    std::unique_ptr<attribute::AttributeReadGuard> makeReadGuard(bool stableEnumGuard) const override;
};

}