summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2021-10-03 14:52:10 +0200
committerTor Egge <Tor.Egge@online.no>2021-10-03 14:52:10 +0200
commit387bcd49e0278faf825f8c96ccc1ff6b09ea096f (patch)
treed4b9df702a928532a56dd0f2bcdf306c79dd90d5
parent94e6c7d871a1086b2259a34ccce1a0b751b16b2f (diff)
Use syntax available on gcc 9 (system compiler on Ubuntu 20.04).
-rw-r--r--eval/src/vespa/eval/eval/optimize_tensor_function.cpp3
-rw-r--r--eval/src/vespa/eval/instruction/best_similarity_function.cpp3
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)) {