diff options
author | Arne Juul <arnej@verizonmedia.com> | 2021-03-11 10:14:14 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2021-03-11 13:04:54 +0000 |
commit | b8aa6761034deb5c3fdcda340f0ee2a36828f362 (patch) | |
tree | f26402fc0a41ca8880060d70b3a15c64d89bb138 /eval | |
parent | 3b98bf891d549f9ac9ba169fff8f66ec99067b3a (diff) |
use TypifyCellMeta in DenseSingleReduceFunction optimizer
Diffstat (limited to 'eval')
-rw-r--r-- | eval/src/vespa/eval/instruction/dense_single_reduce_function.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/eval/src/vespa/eval/instruction/dense_single_reduce_function.cpp b/eval/src/vespa/eval/instruction/dense_single_reduce_function.cpp index 53e91f729ee..f8cbca5ed46 100644 --- a/eval/src/vespa/eval/instruction/dense_single_reduce_function.cpp +++ b/eval/src/vespa/eval/instruction/dense_single_reduce_function.cpp @@ -119,12 +119,13 @@ void my_single_reduce_op(InterpretedFunction::State &state, uint64_t param) { struct MyGetFun { template <typename R1, typename R2, typename R3, typename R4> static auto invoke() { - using AggrType = typename R2::template templ<R1>; - return my_single_reduce_op<R1, AggrType, R3::value, R4::value>; + using CT = CellValueType<R1::value.cell_type>; + using AggrType = typename R2::template templ<CT>; + return my_single_reduce_op<CT, AggrType, R3::value, R4::value>; } }; -using MyTypify = TypifyValue<TypifyCellType,TypifyAggr,TypifyBool>; +using MyTypify = TypifyValue<TypifyCellMeta,TypifyAggr,TypifyBool>; std::pair<std::vector<vespalib::string>,ValueType> sort_and_drop_trivial(const std::vector<vespalib::string> &list_in, const ValueType &type_in) { std::vector<vespalib::string> dropped; @@ -220,6 +221,7 @@ DenseSingleReduceFunction::DenseSingleReduceFunction(const DenseSingleReduceSpec _inner_size(spec.inner_size), _aggr(spec.aggr) { + assert(result_type().cell_meta().is_scalar == false); } DenseSingleReduceFunction::~DenseSingleReduceFunction() = default; @@ -227,7 +229,8 @@ DenseSingleReduceFunction::~DenseSingleReduceFunction() = default; InterpretedFunction::Instruction DenseSingleReduceFunction::compile_self(const ValueBuilderFactory &, Stash &stash) const { - auto op = typify_invoke<4,MyTypify,MyGetFun>(result_type().cell_type(), _aggr, + auto op = typify_invoke<4,MyTypify,MyGetFun>(result_type().cell_meta().limit().not_scalar(), + _aggr, (_reduce_size >= 8), (_inner_size == 1)); auto ¶ms = stash.create<Params>(result_type(), _outer_size, _reduce_size, _inner_size); return InterpretedFunction::Instruction(op, wrap_param<Params>(params)); |