aboutsummaryrefslogtreecommitdiffstats
path: root/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.h
blob: 9a8acc0840871e8434e91d0274acee1fdf31b83c (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
// Copyright Vespa.ai. 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 joining sparse tensors with no overlapping
 * dimensions.
 */
class SparseNoOverlapJoinFunction : public tensor_function::Join
{
public:
    SparseNoOverlapJoinFunction(const tensor_function::Join &original);
    InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override;
    bool result_is_mutable() const override { return true; }
    static bool compatible_types(const ValueType &res, const ValueType &lhs, const ValueType &rhs);
    static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};

} // namespace