diff options
author | Håvard Pettersen <havardpe@oath.com> | 2021-03-12 09:53:16 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@oath.com> | 2021-03-12 09:53:16 +0000 |
commit | 19b09c3439fc3730e94c6ebc9fa0db741001fa71 (patch) | |
tree | 9372efd8035c80e78bec3285a062580de8e82d77 | |
parent | 6d2c14178a26d9b91f495eff2f4fcc3ac799b954 (diff) |
reduce typify expansion
-rw-r--r-- | eval/src/vespa/eval/instruction/generic_reduce.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/eval/src/vespa/eval/instruction/generic_reduce.cpp b/eval/src/vespa/eval/instruction/generic_reduce.cpp index 2c630ca0419..23e53e9734b 100644 --- a/eval/src/vespa/eval/instruction/generic_reduce.cpp +++ b/eval/src/vespa/eval/instruction/generic_reduce.cpp @@ -189,11 +189,11 @@ void my_full_reduce_op(State &state, uint64_t) { }; struct SelectGenericReduceOp { - template <typename ICM, typename OCM, typename AGGR> static auto invoke(const ReduceParam ¶m) { + template <typename ICM, typename OIS, typename AGGR> static auto invoke(const ReduceParam ¶m) { using ICT = CellValueType<ICM::value.cell_type>; - using OCT = CellValueType<OCM::value.cell_type>; + using OCT = CellValueType<CellMeta::reduce(ICM::value.cell_type, OIS::value).cell_type>; using AggrType = typename AGGR::template templ<OCT>; - if constexpr (OCM::value.is_scalar) { + if constexpr (OIS::value) { return my_full_reduce_op<ICT, AggrType>; } else { if (param.sparse_plan.should_forward_index()) { @@ -290,7 +290,7 @@ SparseReducePlan::~SparseReducePlan() = default; //----------------------------------------------------------------------------- -using ReduceTypify = TypifyValue<TypifyCellMeta,TypifyAggr>; +using ReduceTypify = TypifyValue<TypifyCellMeta,TypifyBool,TypifyAggr>; Instruction GenericReduce::make_instruction(const ValueType &result_type, @@ -300,7 +300,7 @@ GenericReduce::make_instruction(const ValueType &result_type, auto ¶m = stash.create<ReduceParam>(input_type, dimensions, factory); assert(result_type == param.res_type); assert(result_type.cell_meta().eq(CellMeta::reduce(input_type.cell_type(), result_type.is_double()))); - auto fun = typify_invoke<3,ReduceTypify,SelectGenericReduceOp>(input_type.cell_meta(), result_type.cell_meta().limit(), aggr, param); + auto fun = typify_invoke<3,ReduceTypify,SelectGenericReduceOp>(input_type.cell_meta(), result_type.cell_meta().is_scalar, aggr, param); return Instruction(fun, wrap_param<ReduceParam>(param)); } |