summaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-03-11 11:38:45 +0000
committerArne Juul <arnej@verizonmedia.com>2021-03-11 13:04:54 +0000
commit4e16fbe7ed83add0be8a8f485c032d1ae2ff8f9a (patch)
treef9e014ec8540312018070decf558bcd44494fee6 /eval
parent04f105fd8b49ac360819f4e57a3cc155ae7bd18c (diff)
use TypifyCellMeta in GenericPeek
Diffstat (limited to 'eval')
-rw-r--r--eval/src/vespa/eval/instruction/generic_peek.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/eval/src/vespa/eval/instruction/generic_peek.cpp b/eval/src/vespa/eval/instruction/generic_peek.cpp
index c8198526b3d..4fd897954c4 100644
--- a/eval/src/vespa/eval/instruction/generic_peek.cpp
+++ b/eval/src/vespa/eval/instruction/generic_peek.cpp
@@ -346,7 +346,10 @@ void my_generic_peek_op(State &state, uint64_t param_in) {
}
struct SelectGenericPeekOp {
- template <typename ICT, typename OCT> static auto invoke() {
+ template <typename ICM, typename OutIsScalar> static auto invoke() {
+ using ICT = CellValueType<ICM::value.cell_type>;
+ constexpr CellMeta ocm = CellMeta::peek(ICM::value.cell_type, OutIsScalar::value);
+ using OCT = CellValueType<ocm.cell_type>;
return my_generic_peek_op<ICT,OCT>;
}
};
@@ -362,8 +365,9 @@ GenericPeek::make_instruction(const ValueType &result_type,
const ValueBuilderFactory &factory,
Stash &stash)
{
+ using PeekTypify = TypifyValue<TypifyCellMeta,TypifyBool>;
const auto &param = stash.create<PeekParam>(result_type, input_type, spec, factory);
- auto fun = typify_invoke<2,TypifyCellType,SelectGenericPeekOp>(input_type.cell_type(), result_type.cell_type());
+ auto fun = typify_invoke<2,PeekTypify,SelectGenericPeekOp>(input_type.cell_meta(), result_type.is_double());
return Instruction(fun, wrap_param<PeekParam>(param));
}