aboutsummaryrefslogtreecommitdiffstats
path: root/eval/src/vespa/eval/instruction/pow_as_map_optimizer.h
blob: 2358286d8eb38d803d368a5df83d3c716cd5366e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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 optimizer for converting join expressions on the
 * form 'join(tensor,<small integer constant>,f(x,y)(pow(x,y))' to
 * expressions on the form 'map(tensor,f(x)(x*x...))'.
 **/
struct PowAsMapOptimizer {
    static const TensorFunction &optimize(const TensorFunction &expr, Stash &stash);
};

} // namespace vespalib::eval