blob: fc8dc5739b2197ee939f8befcdfa26b2392a4470 (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "vector_bundle.h"
#include <vespa/vespalib/util/string_id.h>
namespace search::tensor {
/*
* This class contains a reference to a tensor stored in a TensorBufferStore.
*/
class SerializedTensorRef
{
VectorBundle _vectors;
uint32_t _num_mapped_dimensions;
vespalib::ConstArrayRef<vespalib::string_id> _labels; // all subspaces
public:
SerializedTensorRef();
SerializedTensorRef(VectorBundle vectors, uint32_t num_mapped_dimensions, vespalib::ConstArrayRef<vespalib::string_id> labels);
~SerializedTensorRef();
const VectorBundle& get_vectors() const noexcept { return _vectors; }
vespalib::ConstArrayRef<vespalib::string_id> get_labels(uint32_t subspace) const;
};
}
|