blob: a4bf6e07519cf5483e608a4b92000edb2587ce31 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/searchlib/attribute/attributesaver.h>
#include "tensor_attribute.h"
namespace search::tensor {
/*
* Class for saving a tensor attribute.
*/
class TensorStoreSaver : public AttributeSaver
{
public:
using RefCopyVector = TensorAttribute::RefCopyVector;
private:
using GenerationHandler = vespalib::GenerationHandler;
RefCopyVector _refs;
const TensorStore& _tensorStore;
bool onSave(IAttributeSaveTarget &saveTarget) override;
public:
TensorStoreSaver(GenerationHandler::Guard &&guard,
const attribute::AttributeHeader &header,
RefCopyVector &&refs,
const TensorStore &tensorStore);
virtual ~TensorStoreSaver();
};
} // namespace search::tensor
|