aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/features/tensor_attribute_executor.h
blob: 1ca05d058cb4e38b3b6d063917c6fa4053485936 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/searchcommon/attribute/iattributevector.h>
#include <vespa/searchlib/fef/featureexecutor.h>
#include <vespa/eval/eval/value.h>
#include <vespa/vespalib/stllike/string.h>

namespace search::tensor { class ITensorAttribute; }
namespace search::features {

class TensorAttributeExecutor : public fef::FeatureExecutor
{
private:
    const search::tensor::ITensorAttribute& _attribute;
    std::unique_ptr<vespalib::eval::Value> _emptyTensor;
    std::unique_ptr<vespalib::eval::Value> _tensor;

public:
    TensorAttributeExecutor(const search::tensor::ITensorAttribute& attribute);
    void execute(uint32_t docId) override;
};

}