blob: a7f778b2949c788d073cefde23d59b6d6ff5ec48 (
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/eval/eval/tensor_function.h>
namespace vespalib::eval {
/**
* Tensor function for efficient type-only modification of values.
**/
class ReplaceTypeFunction : public tensor_function::Op1
{
public:
ReplaceTypeFunction(const ValueType &result_type,
const TensorFunction &child);
~ReplaceTypeFunction();
InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
bool result_is_mutable() const override { return child().result_is_mutable(); }
static const ReplaceTypeFunction &create_compact(const ValueType &result_type,
const TensorFunction &child,
Stash &stash);
};
} // namespace vespalib::eval
|