summaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/tensor/doc_vector_access.h
blob: e5dfa35a529e1d6c30d1d76b8deb669ceefda92f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2020 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/eval/tensor/dense/typed_cells.h>
#include <cstdint>

namespace search::tensor {

/**
 * Interface that provides access to the vector that is associated with the the given document id.
 *
 * All vectors should be the same size and either of type float or double.
 */
class DocVectorAccess {
public:
    virtual ~DocVectorAccess() {}
    virtual vespalib::tensor::TypedCells get_vector(uint32_t docid) const = 0;
};

}