diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-09-16 18:00:10 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-09-16 18:00:10 +0000 |
commit | cefbaa26062e228262a39110ecabf7b031c69100 (patch) | |
tree | 426121df45c7232ad98a96667af4fabdccb03377 /eval/src | |
parent | c48c65becbca835d03ebb75dcbc828d13eb0fe75 (diff) |
Avoid including smallvector in arrayref, then it is included 'everywhere'.
Diffstat (limited to 'eval/src')
10 files changed, 19 insertions, 12 deletions
diff --git a/eval/src/tests/ann/doc_vector_access.h b/eval/src/tests/ann/doc_vector_access.h index 4d1460b8812..81ed436e274 100644 --- a/eval/src/tests/ann/doc_vector_access.h +++ b/eval/src/tests/ann/doc_vector_access.h @@ -1,11 +1,13 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once + #include <vespa/vespalib/util/arrayref.h> +#include <cstdint> template <typename FltType = float> struct DocVectorAccess { virtual vespalib::ConstArrayRef<FltType> get(uint32_t docid) const = 0; - virtual ~DocVectorAccess() {} + virtual ~DocVectorAccess() = default; }; diff --git a/eval/src/vespa/eval/instruction/dense_lambda_peek_optimizer.cpp b/eval/src/vespa/eval/instruction/dense_lambda_peek_optimizer.cpp index b51d882d406..b2fe30d83e0 100644 --- a/eval/src/vespa/eval/instruction/dense_lambda_peek_optimizer.cpp +++ b/eval/src/vespa/eval/instruction/dense_lambda_peek_optimizer.cpp @@ -11,6 +11,7 @@ #include <vespa/eval/eval/call_nodes.h> #include <vespa/eval/eval/tensor_nodes.h> #include <vespa/eval/eval/llvm/compile_cache.h> +#include <vespa/vespalib/util/small_vector.h> #include <optional> using namespace vespalib::eval::nodes; diff --git a/eval/src/vespa/eval/instruction/dense_tensor_peek_function.h b/eval/src/vespa/eval/instruction/dense_tensor_peek_function.h index 517d8ffc6e1..496f4ceaed7 100644 --- a/eval/src/vespa/eval/instruction/dense_tensor_peek_function.h +++ b/eval/src/vespa/eval/instruction/dense_tensor_peek_function.h @@ -3,6 +3,7 @@ #pragma once #include <vespa/eval/eval/tensor_function.h> +#include <vespa/vespalib/util/small_vector.h> namespace vespalib::eval { @@ -23,7 +24,7 @@ private: SmallVector<std::pair<int64_t,size_t>> _spec; public: DenseTensorPeekFunction(std::vector<Child> children, SmallVector<std::pair<int64_t,size_t>> spec); - ~DenseTensorPeekFunction(); + ~DenseTensorPeekFunction() override; const ValueType &result_type() const override { return DoubleValue::shared_type(); } void push_children(std::vector<Child::CREF> &children) const override; InterpretedFunction::Instruction compile_self(const ValueBuilderFactory &factory, Stash &stash) const override; diff --git a/eval/src/vespa/eval/instruction/generic_concat.h b/eval/src/vespa/eval/instruction/generic_concat.h index 2fb5af88181..5b27988c5bd 100644 --- a/eval/src/vespa/eval/instruction/generic_concat.h +++ b/eval/src/vespa/eval/instruction/generic_concat.h @@ -6,7 +6,7 @@ #include <vespa/eval/eval/value_type.h> #include <vespa/eval/eval/interpreted_function.h> #include <vespa/vespalib/stllike/string.h> -#include <vector> +#include <vespa/vespalib/util/small_vector.h> namespace vespalib::eval { struct ValueBuilderFactory; } diff --git a/eval/src/vespa/eval/instruction/generic_join.cpp b/eval/src/vespa/eval/instruction/generic_join.cpp index 60dc3e55143..03c759c225f 100644 --- a/eval/src/vespa/eval/instruction/generic_join.cpp +++ b/eval/src/vespa/eval/instruction/generic_join.cpp @@ -51,7 +51,7 @@ generic_mixed_join(const Value &lhs, const Value &rhs, const JoinParam ¶m) } } return builder->build(std::move(builder)); -}; +} namespace { @@ -64,7 +64,7 @@ void my_mixed_join_op(State &state, uint64_t param_in) { auto &result = state.stash.create<std::unique_ptr<Value>>(std::move(up)); const Value &result_ref = *(result.get()); state.pop_pop_push(result_ref); -}; +} //----------------------------------------------------------------------------- @@ -95,7 +95,7 @@ void my_mixed_dense_join_op(State &state, uint64_t param_in) { assert(rhs == rhs_cells.end()); } state.pop_pop_push(state.stash.create<ValueView>(param.res_type, index, TypedCells(out_cells))); -}; +} //----------------------------------------------------------------------------- @@ -110,7 +110,7 @@ void my_dense_join_op(State &state, uint64_t param_in) { auto join_cells = [&](size_t lhs_idx, size_t rhs_idx) { *dst++ = fun(lhs_cells[lhs_idx], rhs_cells[rhs_idx]); }; param.dense_plan.execute(0, 0, join_cells); state.pop_pop_push(state.stash.create<DenseValueView>(param.res_type, TypedCells(out_cells))); -}; +} //----------------------------------------------------------------------------- @@ -119,7 +119,7 @@ void my_double_join_op(State &state, uint64_t param_in) { Fun fun(unwrap_param<JoinParam>(param_in).function); state.pop_pop_push(state.stash.create<DoubleValue>(fun(state.peek(1).as_double(), state.peek(0).as_double()))); -}; +} //----------------------------------------------------------------------------- diff --git a/eval/src/vespa/eval/instruction/generic_join.h b/eval/src/vespa/eval/instruction/generic_join.h index 72ae0b89d2c..7d9c6352868 100644 --- a/eval/src/vespa/eval/instruction/generic_join.h +++ b/eval/src/vespa/eval/instruction/generic_join.h @@ -6,6 +6,7 @@ #include <vespa/eval/eval/value_type.h> #include <vespa/eval/eval/operation.h> #include <vespa/eval/eval/interpreted_function.h> +#include <vespa/vespalib/util/small_vector.h> namespace vespalib { class Stash; } namespace vespalib::eval { struct ValueBuilderFactory; } @@ -64,7 +65,7 @@ struct SparseJoinPlan { bool should_forward_lhs_index() const; bool should_forward_rhs_index() const; SparseJoinPlan(const ValueType &lhs_type, const ValueType &rhs_type); - SparseJoinPlan(size_t num_mapped_dims); // full overlap plan + explicit SparseJoinPlan(size_t num_mapped_dims); // full overlap plan ~SparseJoinPlan(); }; diff --git a/eval/src/vespa/eval/instruction/generic_lambda.cpp b/eval/src/vespa/eval/instruction/generic_lambda.cpp index 2fe508fc310..1558d99b960 100644 --- a/eval/src/vespa/eval/instruction/generic_lambda.cpp +++ b/eval/src/vespa/eval/instruction/generic_lambda.cpp @@ -3,7 +3,7 @@ #include "generic_lambda.h" #include <vespa/eval/eval/llvm/compiled_function.h> #include <vespa/eval/eval/llvm/compile_cache.h> -#include <assert.h> +#include <vespa/vespalib/util/small_vector.h> using namespace vespalib::eval::tensor_function; diff --git a/eval/src/vespa/eval/instruction/generic_peek.cpp b/eval/src/vespa/eval/instruction/generic_peek.cpp index b1952cfefb7..a9900ce523e 100644 --- a/eval/src/vespa/eval/instruction/generic_peek.cpp +++ b/eval/src/vespa/eval/instruction/generic_peek.cpp @@ -8,6 +8,7 @@ #include <vespa/vespalib/util/typify.h> #include <vespa/vespalib/util/visit_ranges.h> #include <vespa/vespalib/util/shared_string_repo.h> +#include <vespa/vespalib/util/small_vector.h> #include <cassert> #include <map> diff --git a/eval/src/vespa/eval/instruction/generic_reduce.h b/eval/src/vespa/eval/instruction/generic_reduce.h index b9b6e7c5167..0e2a82ba6cc 100644 --- a/eval/src/vespa/eval/instruction/generic_reduce.h +++ b/eval/src/vespa/eval/instruction/generic_reduce.h @@ -6,6 +6,7 @@ #include <vespa/eval/eval/aggr.h> #include <vespa/eval/eval/interpreted_function.h> #include <vespa/eval/eval/nested_loop.h> +#include <vespa/vespalib/util/small_vector.h> namespace vespalib { class Stash; } namespace vespalib::eval { struct ValueBuilderFactory; } diff --git a/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.cpp b/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.cpp index f4808faadcc..8922e0da362 100644 --- a/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.cpp +++ b/eval/src/vespa/eval/instruction/sparse_no_overlap_join_function.cpp @@ -52,7 +52,7 @@ const Value &my_fast_no_overlap_sparse_join(const FastAddrMap &lhs_map, const Fa size_t addr_idx = store_rhs_idx[i]; output_addr[addr_idx] = r_addr[i]; } - result.add_mapping(ConstArrayRef(output_addr)); + result.add_mapping(output_addr); CT cell_value = fun(lhs_cells[lhs_subspace], rhs_cells[rhs_subspace]); result.my_cells.push_back_fast(cell_value); } @@ -109,7 +109,7 @@ SparseNoOverlapJoinFunction::compile_self(const ValueBuilderFactory &factory, St lhs().result_type(), rhs().result_type(), function(), factory); auto op = typify_invoke<2,MyTypify,SelectSparseNoOverlapJoinOp>(result_type().cell_meta().limit(), function()); - return InterpretedFunction::Instruction(op, wrap_param<JoinParam>(param)); + return {op, wrap_param<JoinParam>(param)}; } bool |