diff options
-rw-r--r-- | eval/src/vespa/eval/eval/optimize_tensor_function.cpp | 3 | ||||
-rw-r--r-- | eval/src/vespa/eval/instruction/best_similarity_function.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/eval/src/vespa/eval/eval/optimize_tensor_function.cpp b/eval/src/vespa/eval/eval/optimize_tensor_function.cpp index 90849e55a71..695f23bfc05 100644 --- a/eval/src/vespa/eval/eval/optimize_tensor_function.cpp +++ b/eval/src/vespa/eval/eval/optimize_tensor_function.cpp @@ -40,7 +40,8 @@ namespace { using Child = TensorFunction::Child; -void run_optimize_pass(const Child &root, auto optimize_node) { +template <typename Func> +void run_optimize_pass(const Child &root, Func&& optimize_node) { std::vector<Child::CREF> nodes({root}); for (size_t i = 0; i < nodes.size(); ++i) { nodes[i].get().get().push_children(nodes); diff --git a/eval/src/vespa/eval/instruction/best_similarity_function.cpp b/eval/src/vespa/eval/instruction/best_similarity_function.cpp index a8531d84cf0..964f27a4564 100644 --- a/eval/src/vespa/eval/instruction/best_similarity_function.cpp +++ b/eval/src/vespa/eval/instruction/best_similarity_function.cpp @@ -145,7 +145,8 @@ struct SelectFun { const ValueType &res_type; const ValueType &lhs_type; const ValueType &rhs_type; - SelectFun(const auto &res, const auto &lhs, const auto &rhs) + template <typename ResType, typename LhsType, typename RhsType> + SelectFun(const ResType &res, const LhsType &lhs, const RhsType &rhs) : res_type(res.result_type()), lhs_type(lhs.result_type()), rhs_type(rhs.result_type()) {} template <typename R1> static InterpretedFunction::op_function invoke(Aggr best_aggr, op2_t join_fun, CellType cell_types) { if ((best_aggr == Aggr::MAX) && (join_fun == Mul::f) && (cell_types == CellType::FLOAT)) { |