aboutsummaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-03-11 11:26:27 +0000
committerArne Juul <arnej@verizonmedia.com>2021-03-11 13:04:54 +0000
commit04f105fd8b49ac360819f4e57a3cc155ae7bd18c (patch)
tree873c2522b7144903a11637bc749a4f65e7f4a79b /eval
parentc554e86c074e3602ba3999b366c5cf1008a570d7 (diff)
use TypifyCellMeta in GenericMerge
Diffstat (limited to 'eval')
-rw-r--r--eval/src/vespa/eval/instruction/generic_merge.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/eval/src/vespa/eval/instruction/generic_merge.cpp b/eval/src/vespa/eval/instruction/generic_merge.cpp
index 218746d492a..9bff85d27c7 100644
--- a/eval/src/vespa/eval/instruction/generic_merge.cpp
+++ b/eval/src/vespa/eval/instruction/generic_merge.cpp
@@ -90,7 +90,11 @@ void my_mixed_merge_op(State &state, uint64_t param_in) {
};
struct SelectGenericMergeOp {
- template <typename LCT, typename RCT, typename OCT, typename Fun> static auto invoke() {
+ template <typename LCM, typename RCM, typename Fun> static auto invoke() {
+ using LCT = CellValueType<LCM::value.cell_type>;
+ using RCT = CellValueType<RCM::value.cell_type>;
+ constexpr CellMeta ocm = CellMeta::merge(LCM::value, RCM::value);
+ using OCT = CellValueType<ocm.cell_type>;
return my_mixed_merge_op<LCT,RCT,OCT,Fun>;
}
};
@@ -99,7 +103,7 @@ struct SelectGenericMergeOp {
} // namespace <unnamed>
-using MergeTypify = TypifyValue<TypifyCellType,operation::TypifyOp2>;
+using MergeTypify = TypifyValue<TypifyCellMeta,operation::TypifyOp2>;
Instruction
GenericMerge::make_instruction(const ValueType &result_type,
@@ -108,7 +112,7 @@ GenericMerge::make_instruction(const ValueType &result_type,
{
const auto &param = stash.create<MergeParam>(result_type, lhs_type, rhs_type, function, factory);
assert(result_type == ValueType::merge(lhs_type, rhs_type));
- auto fun = typify_invoke<4,MergeTypify,SelectGenericMergeOp>(lhs_type.cell_type(), rhs_type.cell_type(), param.res_type.cell_type(), function);
+ auto fun = typify_invoke<3,MergeTypify,SelectGenericMergeOp>(lhs_type.cell_meta(), rhs_type.cell_meta(), function);
return Instruction(fun, wrap_param<MergeParam>(param));
}