summaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2023-06-29 14:30:12 +0000
committerArne Juul <arnej@yahooinc.com>2023-06-29 14:30:12 +0000
commit5273771babaf4464541c1d1b302f6b9a42137d80 (patch)
treeae6446a7da563f424cdf8bcaba5d6b149d0385f8 /eval
parent116403b79d7e356d78eb0a1d2237611c46961e6d (diff)
style fixes
Diffstat (limited to 'eval')
-rw-r--r--eval/src/vespa/eval/instruction/mixed_l2_distance.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/eval/src/vespa/eval/instruction/mixed_l2_distance.cpp b/eval/src/vespa/eval/instruction/mixed_l2_distance.cpp
index d11bf704df5..df962da12e0 100644
--- a/eval/src/vespa/eval/instruction/mixed_l2_distance.cpp
+++ b/eval/src/vespa/eval/instruction/mixed_l2_distance.cpp
@@ -72,13 +72,13 @@ struct MultiSelectOp {
}
};
-bool mixed_compatible_types(const ValueType &mix, const ValueType &vec, const ValueType &res) {
+bool mixed_compatible_types(const ValueType &res, const ValueType &mix, const ValueType &vec) {
return ((mix.cell_type() == vec.cell_type()) &&
- vec.is_dense() &&
- res.nontrivial_indexed_dimensions().empty() &&
- (res.mapped_dimensions().size() > 0) &&
+ vec.is_dense() &&
+ res.nontrivial_indexed_dimensions().empty() &&
+ (res.mapped_dimensions().size() > 0) &&
(mix.nontrivial_indexed_dimensions() == vec.nontrivial_indexed_dimensions()) &&
- (mix.mapped_dimensions() == res.mapped_dimensions()));
+ (mix.mapped_dimensions() == res.mapped_dimensions()));
}
@@ -113,15 +113,15 @@ MixedL2Distance::optimize(const TensorFunction &expr, Stash &stash)
if (map && (map->function() == operation::Square::f)) {
auto join = as<Join>(map->child());
if (join && (join->function() == operation::Sub::f)) {
- const auto & res_type = expr.result_type();
- const auto & left_type = join->lhs().result_type();
- const auto & right_type = join->rhs().result_type();
- if (mixed_compatible_types(left_type, right_type, res_type)) {
+ const auto & res_type = expr.result_type();
+ const auto & left_type = join->lhs().result_type();
+ const auto & right_type = join->rhs().result_type();
+ if (mixed_compatible_types(res_type, left_type, right_type)) {
return stash.create<MixedL2Distance>(res_type, join->lhs(), join->rhs());
- }
- if (mixed_compatible_types(right_type, left_type, res_type)) {
+ }
+ if (mixed_compatible_types(res_type, right_type, left_type)) {
return stash.create<MixedL2Distance>(res_type, join->rhs(), join->lhs());
- }
+ }
}
}
}