summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-03-01 13:12:41 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-03-08 21:38:36 +0000
commit72e9888bcccbc384d2485409ba055633131ed512 (patch)
tree79eb45091ead4ffeff40a1baf6cebe33edf7a9d4
parentfa93596f761848645b3ee133bfd665ece2cc06d6 (diff)
Specify destructors explicit to control inlining.
Conflicts: build_settings.cmake
-rw-r--r--config/src/vespa/config/common/payload_converter.cpp2
-rw-r--r--config/src/vespa/config/common/payload_converter.h1
-rw-r--r--config/src/vespa/config/helper/configpoller.cpp6
-rw-r--r--config/src/vespa/config/helper/configpoller.h7
-rw-r--r--eval/src/vespa/eval/eval/call_nodes.cpp4
-rw-r--r--eval/src/vespa/eval/eval/call_nodes.h3
-rw-r--r--eval/src/vespa/eval/eval/interpreted_function.cpp30
-rw-r--r--eval/src/vespa/eval/eval/interpreted_function.h22
-rw-r--r--eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp3
-rw-r--r--eval/src/vespa/eval/eval/node_types.cpp12
-rw-r--r--eval/src/vespa/eval/eval/operator_nodes.cpp12
-rw-r--r--eval/src/vespa/eval/eval/operator_nodes.h10
-rw-r--r--eval/src/vespa/eval/eval/simple_tensor.cpp134
-rw-r--r--eval/src/vespa/eval/eval/tensor_spec.cpp18
-rw-r--r--eval/src/vespa/eval/eval/tensor_spec.h3
-rw-r--r--eval/src/vespa/eval/eval/test/tensor_conformance.cpp4
-rw-r--r--eval/src/vespa/eval/tensor/dense/dense_tensor_address_combiner.cpp2
-rw-r--r--eval/src/vespa/eval/tensor/dense/dense_tensor_address_combiner.h3
-rw-r--r--eval/src/vespa/eval/tensor/dense/direct_dense_tensor_builder.cpp2
-rw-r--r--eval/src/vespa/eval/tensor/dense/direct_dense_tensor_builder.h1
-rw-r--r--searchcommon/src/vespa/searchcommon/common/schema.cpp2
-rw-r--r--searchcommon/src/vespa/searchcommon/common/schema.h3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericattribute.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp6
-rw-r--r--staging_vespalib/src/vespa/vespalib/net/http_server.cpp2
-rw-r--r--staging_vespalib/src/vespa/vespalib/net/http_server.h1
-rw-r--r--vespalib/src/vespa/vespalib/data/simple_buffer.cpp4
-rw-r--r--vespalib/src/vespa/vespalib/data/simple_buffer.h4
-rw-r--r--vespalib/src/vespa/vespalib/testkit/test_master.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/testkit/test_master.h1
-rw-r--r--vespalib/src/vespa/vespalib/util/thread.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/thread.h6
-rw-r--r--vespalib/src/vespa/vespalib/util/time_tracker.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/time_tracker.h1
-rw-r--r--vespalib/src/vespa/vespalib/websocket/buffer.h2
-rw-r--r--vespalib/src/vespa/vespalib/websocket/request.cpp7
-rw-r--r--vespalib/src/vespa/vespalib/websocket/request.h2
-rw-r--r--vespalog/src/vespa/log/bufferedlogger.cpp3
38 files changed, 224 insertions, 107 deletions
diff --git a/config/src/vespa/config/common/payload_converter.cpp b/config/src/vespa/config/common/payload_converter.cpp
index 5dc45c12fa3..0dbbd62f392 100644
--- a/config/src/vespa/config/common/payload_converter.cpp
+++ b/config/src/vespa/config/common/payload_converter.cpp
@@ -12,6 +12,8 @@ PayloadConverter::PayloadConverter(const Inspector & inspector)
_lines()
{}
+PayloadConverter::~PayloadConverter() { }
+
const std::vector<vespalib::string> &
PayloadConverter::convert()
{
diff --git a/config/src/vespa/config/common/payload_converter.h b/config/src/vespa/config/common/payload_converter.h
index 3a9d53f4c77..63a4b0a7964 100644
--- a/config/src/vespa/config/common/payload_converter.h
+++ b/config/src/vespa/config/common/payload_converter.h
@@ -14,6 +14,7 @@ namespace config {
class PayloadConverter : public vespalib::slime::ObjectTraverser, public vespalib::slime::ArrayTraverser {
public:
PayloadConverter(const vespalib::slime::Inspector & inspector);
+ ~PayloadConverter();
const std::vector<vespalib::string> & convert();
void field(const vespalib::Memory & symbol, const vespalib::slime::Inspector & inspector);
void entry(size_t idx, const vespalib::slime::Inspector & inspector);
diff --git a/config/src/vespa/config/helper/configpoller.cpp b/config/src/vespa/config/helper/configpoller.cpp
index 281fe8df140..ee9ec1bbc31 100644
--- a/config/src/vespa/config/helper/configpoller.cpp
+++ b/config/src/vespa/config/helper/configpoller.cpp
@@ -1,7 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include "configpoller.h"
+
#include <vespa/log/log.h>
LOG_SETUP(".config.helper.configpoller");
-#include "configpoller.h"
namespace config {
@@ -14,6 +16,8 @@ ConfigPoller::ConfigPoller(const IConfigContext::SP & context)
{
}
+ConfigPoller::~ConfigPoller() { }
+
void
ConfigPoller::run()
{
diff --git a/config/src/vespa/config/helper/configpoller.h b/config/src/vespa/config/helper/configpoller.h
index f614cab5175..af660f6c536 100644
--- a/config/src/vespa/config/helper/configpoller.h
+++ b/config/src/vespa/config/helper/configpoller.h
@@ -1,11 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include "ifetchercallback.h"
+#include "ihandle.h"
#include <vespa/config/subscription/configsubscriber.h>
#include <vespa/config/common/timingvalues.h>
#include <vespa/vespalib/util/runnable.h>
-#include "ifetchercallback.h"
-#include "ihandle.h"
namespace config {
@@ -16,7 +16,8 @@ namespace config {
class ConfigPoller : public vespalib::Runnable {
public:
ConfigPoller(const IConfigContext::SP & context);
- void run();
+ ~ConfigPoller();
+ void run() override;
template <typename ConfigType>
void subscribe(const std::string & configId, IFetcherCallback<ConfigType> * callback, uint64_t subscribeTimeout = DEFAULT_SUBSCRIBE_TIMEOUT);
void subscribeGenerationChanges(IGenerationCallback * callback) { _genCallback = callback; }
diff --git a/eval/src/vespa/eval/eval/call_nodes.cpp b/eval/src/vespa/eval/eval/call_nodes.cpp
index 8260ede54a0..cc09b53835c 100644
--- a/eval/src/vespa/eval/eval/call_nodes.cpp
+++ b/eval/src/vespa/eval/eval/call_nodes.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "call_nodes.h"
#include "node_visitor.h"
@@ -8,6 +7,9 @@ namespace vespalib {
namespace eval {
namespace nodes {
+Call::~Call() { }
+
+
template <typename T> void CallHelper<T>::accept(NodeVisitor &visitor) const {
visitor.visit(static_cast<const T&>(*this));
}
diff --git a/eval/src/vespa/eval/eval/call_nodes.h b/eval/src/vespa/eval/eval/call_nodes.h
index 70996e2f629..01283a00e42 100644
--- a/eval/src/vespa/eval/eval/call_nodes.h
+++ b/eval/src/vespa/eval/eval/call_nodes.h
@@ -2,9 +2,9 @@
#pragma once
+#include "basic_nodes.h"
#include <vespa/vespalib/stllike/string.h>
#include <vespa/vespalib/util/stringfmt.h>
-#include "basic_nodes.h"
#include <map>
#include <cmath>
@@ -29,6 +29,7 @@ private:
public:
Call(const vespalib::string &name_in, size_t num_params_in)
: _name(name_in), _num_params(num_params_in), _is_const(false) {}
+ ~Call();
virtual bool is_const() const override { return _is_const; }
const vespalib::string &name() const { return _name; }
size_t num_params() const { return _num_params; }
diff --git a/eval/src/vespa/eval/eval/interpreted_function.cpp b/eval/src/vespa/eval/eval/interpreted_function.cpp
index 13622e9999f..61edc4567b7 100644
--- a/eval/src/vespa/eval/eval/interpreted_function.cpp
+++ b/eval/src/vespa/eval/eval/interpreted_function.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "interpreted_function.h"
#include "node_visitor.h"
#include "node_traverser.h"
@@ -516,6 +515,7 @@ const Function *get_lambda(const nodes::Node &node) {
} // namespace vespalib::<unnamed>
+
InterpretedFunction::LazyParams::~LazyParams()
{
}
@@ -534,6 +534,34 @@ InterpretedFunction::SimpleObjectParams::resolve(size_t idx, Stash &) const
return params[idx];
}
+InterpretedFunction::State::State(const TensorEngine &engine_in)
+ : engine(engine_in),
+ params(nullptr),
+ stash(),
+ stack(),
+ let_values(),
+ program_offset(0)
+{
+}
+
+void
+InterpretedFunction::State::init(const LazyParams &params_in) {
+ params = &params_in;
+ stash.clear();
+ stack.clear();
+ let_values.clear();
+ program_offset = 0;
+ if_cnt = 0;
+}
+
+void
+InterpretedFunction::State::replace(size_t prune_cnt, const Value &value) {
+ for (size_t i = 0; i < prune_cnt; ++i) {
+ stack.pop_back();
+ }
+ stack.push_back(value);
+}
+
InterpretedFunction::Context::Context(const InterpretedFunction &ifun)
: _state(ifun._tensor_engine)
{
diff --git a/eval/src/vespa/eval/eval/interpreted_function.h b/eval/src/vespa/eval/eval/interpreted_function.h
index 3a3e6173fd5..d0e6de119af 100644
--- a/eval/src/vespa/eval/eval/interpreted_function.h
+++ b/eval/src/vespa/eval/eval/interpreted_function.h
@@ -59,25 +59,15 @@ public:
std::vector<Value::CREF> let_values;
uint32_t program_offset;
uint32_t if_cnt;
- State(const TensorEngine &engine_in)
- : engine(engine_in), params(nullptr), stash(), stack(), let_values(), program_offset(0) {}
- void init(const LazyParams &params_in) {
- params = &params_in;
- stash.clear();
- stack.clear();
- let_values.clear();
- program_offset = 0;
- if_cnt = 0;
- }
+
+ State(const TensorEngine &engine_in);
+ ~State();
+
+ void init(const LazyParams &params_in);
const Value &peek(size_t ridx) const {
return stack[stack.size() - 1 - ridx];
}
- void replace(size_t prune_cnt, const Value &value) {
- for (size_t i = 0; i < prune_cnt; ++i) {
- stack.pop_back();
- }
- stack.push_back(value);
- }
+ void replace(size_t prune_cnt, const Value &value);
};
class Context {
friend class InterpretedFunction;
diff --git a/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp b/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp
index 0d404f2077b..021e850188d 100644
--- a/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp
+++ b/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp
@@ -163,6 +163,7 @@ struct FunctionBuilder : public NodeVisitor, public NodeTraverser {
params.push_back(itr);
}
}
+ ~FunctionBuilder();
//-------------------------------------------------------------------------
@@ -618,6 +619,8 @@ struct FunctionBuilder : public NodeVisitor, public NodeTraverser {
}
};
+FunctionBuilder::~FunctionBuilder() { }
+
} // namespace vespalib::eval::<unnamed>
struct InitializeNativeTarget {
diff --git a/eval/src/vespa/eval/eval/node_types.cpp b/eval/src/vespa/eval/eval/node_types.cpp
index 4834f102790..c02060a1060 100644
--- a/eval/src/vespa/eval/eval/node_types.cpp
+++ b/eval/src/vespa/eval/eval/node_types.cpp
@@ -72,8 +72,8 @@ struct TypeResolver : public NodeVisitor, public NodeTraverser {
using action_function = void (*)(State &);
std::vector<std::pair<const Node *, action_function>> actions;
TypeResolver(const std::vector<ValueType> &params_in,
- std::map<const Node *, ValueType> &type_map_out)
- : state(params_in, type_map_out), actions() {}
+ std::map<const Node *, ValueType> &type_map_out);
+ ~TypeResolver();
//-------------------------------------------------------------------------
@@ -242,6 +242,14 @@ struct TypeResolver : public NodeVisitor, public NodeTraverser {
}
};
+TypeResolver::TypeResolver(const std::vector<ValueType> &params_in,
+ std::map<const Node *, ValueType> &type_map_out)
+ : state(params_in, type_map_out),
+ actions()
+{ }
+
+TypeResolver::~TypeResolver() { }
+
} // namespace vespalib::eval::nodes::<unnamed>
} // namespace vespalib::eval::nodes
diff --git a/eval/src/vespa/eval/eval/operator_nodes.cpp b/eval/src/vespa/eval/eval/operator_nodes.cpp
index ab6955a8248..ea8ab56030f 100644
--- a/eval/src/vespa/eval/eval/operator_nodes.cpp
+++ b/eval/src/vespa/eval/eval/operator_nodes.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "operator_nodes.h"
#include "node_visitor.h"
@@ -8,6 +7,17 @@ namespace vespalib {
namespace eval {
namespace nodes {
+Operator::Operator(const vespalib::string &op_str_in, int priority_in, Order order_in)
+ : _op_str(op_str_in),
+ _priority(priority_in),
+ _order(order_in),
+ _lhs(),
+ _rhs(),
+ _is_const(false)
+{}
+
+Operator::~Operator() { }
+
template <typename T> void OperatorHelper<T>::accept(NodeVisitor &visitor) const {
visitor.visit(static_cast<const T&>(*this));
}
diff --git a/eval/src/vespa/eval/eval/operator_nodes.h b/eval/src/vespa/eval/eval/operator_nodes.h
index 34b1e60d571..a0726137015 100644
--- a/eval/src/vespa/eval/eval/operator_nodes.h
+++ b/eval/src/vespa/eval/eval/operator_nodes.h
@@ -2,11 +2,11 @@
#pragma once
-#include <cmath>
-#include <memory>
+#include "basic_nodes.h"
#include <vespa/vespalib/stllike/string.h>
#include <vespa/vespalib/util/stringfmt.h>
-#include "basic_nodes.h"
+#include <cmath>
+#include <memory>
#include <map>
namespace vespalib {
@@ -35,8 +35,8 @@ private:
bool _is_const;
public:
- Operator(const vespalib::string &op_str_in, int priority_in, Order order_in)
- : _op_str(op_str_in), _priority(priority_in), _order(order_in), _lhs(), _rhs(), _is_const(false) {}
+ Operator(const vespalib::string &op_str_in, int priority_in, Order order_in);
+ ~Operator();
vespalib::string op_str() const { return _op_str; }
int priority() const { return _priority; }
Order order() const { return _order; }
diff --git a/eval/src/vespa/eval/eval/simple_tensor.cpp b/eval/src/vespa/eval/eval/simple_tensor.cpp
index fbe2278a0c9..8845974acf7 100644
--- a/eval/src/vespa/eval/eval/simple_tensor.cpp
+++ b/eval/src/vespa/eval/eval/simple_tensor.cpp
@@ -141,27 +141,8 @@ private:
size_t _block_size;
BlockMap _blocks;
public:
- explicit Builder(const ValueType &type)
- : _type(type),
- _mapped(),
- _indexed(),
- _block_size(1),
- _blocks()
- {
- assert_type(_type);
- for (size_t i = 0; i < type.dimensions().size(); ++i) {
- const auto &dimension = _type.dimensions()[i];
- if (dimension.is_mapped()) {
- _mapped.push_back(i);
- } else {
- _block_size *= dimension.size;
- _indexed.push_back(i);
- }
- }
- if (_mapped.empty()) {
- _blocks.emplace(Address(), Block(_type, _indexed, _block_size));
- }
- }
+ explicit Builder(const ValueType &type);
+ ~Builder();
void set(const Address &address, double value) {
assert_address(address, _type);
Address block_key = select(address, _mapped);
@@ -189,6 +170,29 @@ public:
}
};
+Builder::Builder(const ValueType &type)
+ : _type(type),
+ _mapped(),
+ _indexed(),
+ _block_size(1),
+ _blocks()
+{
+ assert_type(_type);
+ for (size_t i = 0; i < type.dimensions().size(); ++i) {
+ const auto &dimension = _type.dimensions()[i];
+ if (dimension.is_mapped()) {
+ _mapped.push_back(i);
+ } else {
+ _block_size *= dimension.size;
+ _indexed.push_back(i);
+ }
+ }
+ if (_mapped.empty()) {
+ _blocks.emplace(Address(), Block(_type, _indexed, _block_size));
+ }
+}
+Builder::~Builder() { }
+
/**
* Helper class used to calculate which dimensions are shared between
* types and which are not. Also calculates how address elements from
@@ -204,42 +208,18 @@ struct TypeAnalyzer {
IndexList combine;
size_t ignored_a;
size_t ignored_b;
- TypeAnalyzer(const ValueType &lhs, const ValueType &rhs, const vespalib::string &ignore = "")
- : only_a(), overlap_a(), overlap_b(), only_b(), combine(), ignored_a(npos), ignored_b(npos)
- {
- const auto &a = lhs.dimensions();
- const auto &b = rhs.dimensions();
- size_t b_idx = 0;
- for (size_t a_idx = 0; a_idx < a.size(); ++a_idx) {
- while ((b_idx < b.size()) && (b[b_idx].name < a[a_idx].name)) {
- if (b[b_idx].name != ignore) {
- only_b.push_back(b_idx);
- combine.push_back(a.size() + b_idx);
- } else {
- ignored_b = b_idx;
- }
- ++b_idx;
- }
- if ((b_idx < b.size()) && (b[b_idx].name == a[a_idx].name)) {
- if (a[a_idx].name != ignore) {
- overlap_a.push_back(a_idx);
- overlap_b.push_back(b_idx);
- combine.push_back(a_idx);
- } else {
- ignored_a = a_idx;
- ignored_b = b_idx;
- }
- ++b_idx;
- } else {
- if (a[a_idx].name != ignore) {
- only_a.push_back(a_idx);
- combine.push_back(a_idx);
- } else {
- ignored_a = a_idx;
- }
- }
- }
- while (b_idx < b.size()) {
+ TypeAnalyzer(const ValueType &lhs, const ValueType &rhs, const vespalib::string &ignore = "");
+ ~TypeAnalyzer();
+};
+
+TypeAnalyzer::TypeAnalyzer(const ValueType &lhs, const ValueType &rhs, const vespalib::string &ignore)
+ : only_a(), overlap_a(), overlap_b(), only_b(), combine(), ignored_a(npos), ignored_b(npos)
+{
+ const auto &a = lhs.dimensions();
+ const auto &b = rhs.dimensions();
+ size_t b_idx = 0;
+ for (size_t a_idx = 0; a_idx < a.size(); ++a_idx) {
+ while ((b_idx < b.size()) && (b[b_idx].name < a[a_idx].name)) {
if (b[b_idx].name != ignore) {
only_b.push_back(b_idx);
combine.push_back(a.size() + b_idx);
@@ -248,8 +228,37 @@ struct TypeAnalyzer {
}
++b_idx;
}
+ if ((b_idx < b.size()) && (b[b_idx].name == a[a_idx].name)) {
+ if (a[a_idx].name != ignore) {
+ overlap_a.push_back(a_idx);
+ overlap_b.push_back(b_idx);
+ combine.push_back(a_idx);
+ } else {
+ ignored_a = a_idx;
+ ignored_b = b_idx;
+ }
+ ++b_idx;
+ } else {
+ if (a[a_idx].name != ignore) {
+ only_a.push_back(a_idx);
+ combine.push_back(a_idx);
+ } else {
+ ignored_a = a_idx;
+ }
+ }
}
-};
+ while (b_idx < b.size()) {
+ if (b[b_idx].name != ignore) {
+ only_b.push_back(b_idx);
+ combine.push_back(a.size() + b_idx);
+ } else {
+ ignored_b = b_idx;
+ }
+ ++b_idx;
+ }
+}
+
+TypeAnalyzer::~TypeAnalyzer() { }
/**
* A view is a total ordering of cells from a SimpleTensor according
@@ -316,6 +325,7 @@ public:
}
std::sort(_refs.begin(), _refs.end(), _less);
}
+ ~View();
const IndexList &selector() const { return _less.selector; }
const CellRef *refs_begin() const { return &_refs[0]; }
const CellRef *refs_end() const { return (refs_begin() + _refs.size()); }
@@ -323,6 +333,8 @@ public:
EqualRange next_range(const EqualRange &prev) const { return make_range(prev.end()); }
};
+View::~View() { }
+
/**
* Helper class used to find matching EqualRanges from two different
* SimpleTensor Views.
@@ -343,6 +355,7 @@ public:
{
assert(a_selector.size() == b_selector.size());
}
+ ~CrossCompare();
Result compare(const Cell &a, const Cell &b) const {
for (size_t i = 0; i < a_selector.size(); ++i) {
if (a.address[a_selector[i]] != b.address[b_selector[i]]) {
@@ -392,6 +405,7 @@ public:
{
find_match();
}
+ ~ViewMatcher();
bool valid() const { return (has_a() && has_b()); }
const EqualRange &get_a() const { return _a_range; }
const EqualRange &get_b() const { return _b_range; }
@@ -402,6 +416,10 @@ public:
}
};
+ViewMatcher::~ViewMatcher() { }
+
+ViewMatcher::CrossCompare::~CrossCompare() { }
+
} // namespace vespalib::eval::<unnamed>
constexpr size_t TensorSpec::Label::npos;
diff --git a/eval/src/vespa/eval/eval/tensor_spec.cpp b/eval/src/vespa/eval/eval/tensor_spec.cpp
index eec930b8da4..dfd8b06bb52 100644
--- a/eval/src/vespa/eval/eval/tensor_spec.cpp
+++ b/eval/src/vespa/eval/eval/tensor_spec.cpp
@@ -1,17 +1,23 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/vespalib/util/stringfmt.h>
#include "tensor_spec.h"
-#include <iostream>
+#include <vespa/vespalib/util/stringfmt.h>
+#include <ostream>
namespace vespalib {
namespace eval {
+TensorSpec::TensorSpec(const vespalib::string &type_spec)
+ : _type(type_spec),
+ _cells()
+{ }
+
+TensorSpec::~TensorSpec() { }
+
vespalib::string
TensorSpec::to_string() const
{
- vespalib::string out = vespalib::make_string("spec(%s) {\n", _type.c_str());
+ vespalib::string out = make_string("spec(%s) {\n", _type.c_str());
for (const auto &cell: _cells) {
size_t n = 0;
out.append(" [");
@@ -22,10 +28,10 @@ TensorSpec::to_string() const
if (label.second.is_mapped()) {
out.append(label.second.name);
} else {
- out.append(vespalib::make_string("%zu", label.second.index));
+ out.append(make_string("%zu", label.second.index));
}
}
- out.append(vespalib::make_string("]: %g\n", cell.second.value));
+ out.append(make_string("]: %g\n", cell.second.value));
}
out.append("}");
return out;
diff --git a/eval/src/vespa/eval/eval/tensor_spec.h b/eval/src/vespa/eval/eval/tensor_spec.h
index 06a9a3a2825..4f615d21906 100644
--- a/eval/src/vespa/eval/eval/tensor_spec.h
+++ b/eval/src/vespa/eval/eval/tensor_spec.h
@@ -54,7 +54,8 @@ private:
vespalib::string _type;
Cells _cells;
public:
- TensorSpec(const vespalib::string &type_spec) : _type(type_spec), _cells() {}
+ TensorSpec(const vespalib::string &type_spec);
+ ~TensorSpec();
TensorSpec &add(const Address &address, double value) {
_cells.emplace(address, value);
return *this;
diff --git a/eval/src/vespa/eval/eval/test/tensor_conformance.cpp b/eval/src/vespa/eval/eval/test/tensor_conformance.cpp
index 2445160bcd9..93b0cde7363 100644
--- a/eval/src/vespa/eval/eval/test/tensor_conformance.cpp
+++ b/eval/src/vespa/eval/eval/test/tensor_conformance.cpp
@@ -124,7 +124,11 @@ struct Domain {
: dimension(dimension_in), size(size_in), keys() {}
Domain(const vespalib::string &dimension_in, const std::vector<vespalib::string> &keys_in)
: dimension(dimension_in), size(0), keys(keys_in) {}
+ ~Domain();
};
+
+Domain::~Domain() { }
+
using Layout = std::vector<Domain>;
Domain x() { return Domain("x", {}); }
diff --git a/eval/src/vespa/eval/tensor/dense/dense_tensor_address_combiner.cpp b/eval/src/vespa/eval/tensor/dense/dense_tensor_address_combiner.cpp
index 53af60bd101..a85a65ed8a9 100644
--- a/eval/src/vespa/eval/tensor/dense/dense_tensor_address_combiner.cpp
+++ b/eval/src/vespa/eval/tensor/dense/dense_tensor_address_combiner.cpp
@@ -33,6 +33,8 @@ public:
}
+DenseTensorAddressCombiner::~DenseTensorAddressCombiner() { }
+
DenseTensorAddressCombiner::DenseTensorAddressCombiner(const eval::ValueType &lhs,
const eval::ValueType &rhs)
: _ops(),
diff --git a/eval/src/vespa/eval/tensor/dense/dense_tensor_address_combiner.h b/eval/src/vespa/eval/tensor/dense/dense_tensor_address_combiner.h
index 482b7f86fc1..9e5f009fa82 100644
--- a/eval/src/vespa/eval/tensor/dense/dense_tensor_address_combiner.h
+++ b/eval/src/vespa/eval/tensor/dense/dense_tensor_address_combiner.h
@@ -2,10 +2,10 @@
#pragma once
+#include "dense_tensor_cells_iterator.h"
#include <vespa/eval/tensor/tensor.h>
#include <vespa/eval/tensor/types.h>
#include <vespa/eval/eval/value_type.h>
-#include "dense_tensor_cells_iterator.h"
namespace vespalib {
namespace tensor {
@@ -36,6 +36,7 @@ private:
public:
DenseTensorAddressCombiner(const eval::ValueType &lhs,
const eval::ValueType &rhs);
+ ~DenseTensorAddressCombiner();
bool combine(const CellsIterator &lhsItr,
const CellsIterator &rhsItr);
diff --git a/eval/src/vespa/eval/tensor/dense/direct_dense_tensor_builder.cpp b/eval/src/vespa/eval/tensor/dense/direct_dense_tensor_builder.cpp
index 8a7ed1928ef..e98bc0261d8 100644
--- a/eval/src/vespa/eval/tensor/dense/direct_dense_tensor_builder.cpp
+++ b/eval/src/vespa/eval/tensor/dense/direct_dense_tensor_builder.cpp
@@ -35,6 +35,8 @@ calculateCellAddress(const Address &address, const ValueType &type)
}
+DirectDenseTensorBuilder::~DirectDenseTensorBuilder() { }
+
DirectDenseTensorBuilder::DirectDenseTensorBuilder(const ValueType &type_in)
: _type(type_in),
_cells(calculateCellsSize(_type))
diff --git a/eval/src/vespa/eval/tensor/dense/direct_dense_tensor_builder.h b/eval/src/vespa/eval/tensor/dense/direct_dense_tensor_builder.h
index b5329860e86..dc755e5bd1d 100644
--- a/eval/src/vespa/eval/tensor/dense/direct_dense_tensor_builder.h
+++ b/eval/src/vespa/eval/tensor/dense/direct_dense_tensor_builder.h
@@ -22,6 +22,7 @@ private:
public:
DirectDenseTensorBuilder(const eval::ValueType &type_in);
+ ~DirectDenseTensorBuilder();
void insertCell(const Address &address, double cellValue);
Tensor::UP build();
};
diff --git a/searchcommon/src/vespa/searchcommon/common/schema.cpp b/searchcommon/src/vespa/searchcommon/common/schema.cpp
index 334fb424e77..394067f36a1 100644
--- a/searchcommon/src/vespa/searchcommon/common/schema.cpp
+++ b/searchcommon/src/vespa/searchcommon/common/schema.cpp
@@ -239,6 +239,8 @@ Schema::Schema()
{
}
+Schema::Schema(const Schema & rhs) = default;
+
Schema::~Schema() { }
bool
diff --git a/searchcommon/src/vespa/searchcommon/common/schema.h b/searchcommon/src/vespa/searchcommon/common/schema.h
index 0870cb43f8c..f1b401b04a9 100644
--- a/searchcommon/src/vespa/searchcommon/common/schema.h
+++ b/searchcommon/src/vespa/searchcommon/common/schema.h
@@ -2,11 +2,11 @@
#pragma once
+#include "datatype.h"
#include <vespa/vespalib/stllike/string.h>
#include <vespa/vespalib/stllike/hash_map.h>
#include <vespa/vespalib/util/ptrholder.h>
#include <vector>
-#include "datatype.h"
namespace vespalib {
class asciistream;
@@ -169,6 +169,7 @@ public:
* Create an initially empty schema
**/
Schema();
+ Schema(const Schema & rhs);
~Schema();
/**
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h
index 3189b452476..73429baf4a2 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.h
@@ -60,7 +60,7 @@ protected:
}
public:
- virtual uint32_t getRawValues(DocId doc, const WType * & values) const { return get(doc, values); }
+ virtual uint32_t getRawValues(DocId doc, const WType * & values) const final;
/*
* Specialization of SearchContext for weighted set type
*/
diff --git a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp
index f287be4db29..d28945b20ed 100644
--- a/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/multinumericattribute.hpp
@@ -193,6 +193,12 @@ MultiValueNumericAttribute<B, M>::onInitSave()
}
template <typename B, typename M>
+uint32_t
+MultiValueNumericAttribute<B, M>::getRawValues(DocId doc, const WType * & values) const {
+ return get(doc, values);
+}
+
+template <typename B, typename M>
bool MultiValueNumericAttribute<B, M>::SetSearchContext::valid() const { return this->isValid(); }
template <typename B, typename M>
diff --git a/staging_vespalib/src/vespa/vespalib/net/http_server.cpp b/staging_vespalib/src/vespa/vespalib/net/http_server.cpp
index 211d4f2c810..32b9caab687 100644
--- a/staging_vespalib/src/vespa/vespalib/net/http_server.cpp
+++ b/staging_vespalib/src/vespa/vespalib/net/http_server.cpp
@@ -51,6 +51,8 @@ HttpServer::HttpServer(int port_in)
_server->SetKeepAlive(false);
}
+HttpServer::~HttpServer() { }
+
void
HttpServer::start()
{
diff --git a/staging_vespalib/src/vespa/vespalib/net/http_server.h b/staging_vespalib/src/vespa/vespalib/net/http_server.h
index a889dd9e091..2d8beb2e1ee 100644
--- a/staging_vespalib/src/vespa/vespalib/net/http_server.h
+++ b/staging_vespalib/src/vespa/vespalib/net/http_server.h
@@ -41,6 +41,7 @@ private:
public:
typedef std::unique_ptr<HttpServer> UP;
HttpServer(int port_in);
+ ~HttpServer();
const vespalib::string &host() const { return _my_host; }
JsonHandlerRepo &repo() { return _handler_repo; }
void start();
diff --git a/vespalib/src/vespa/vespalib/data/simple_buffer.cpp b/vespalib/src/vespa/vespalib/data/simple_buffer.cpp
index a9bf80ac845..5e0f0a5f8e0 100644
--- a/vespalib/src/vespa/vespalib/data/simple_buffer.cpp
+++ b/vespalib/src/vespa/vespalib/data/simple_buffer.cpp
@@ -1,7 +1,7 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "simple_buffer.h"
+#include <cassert>
namespace vespalib {
@@ -11,6 +11,8 @@ SimpleBuffer::SimpleBuffer()
{
}
+SimpleBuffer::~SimpleBuffer() { }
+
Memory
SimpleBuffer::obtain()
{
diff --git a/vespalib/src/vespa/vespalib/data/simple_buffer.h b/vespalib/src/vespa/vespalib/data/simple_buffer.h
index ef3b6d284dc..631d5530cc8 100644
--- a/vespalib/src/vespa/vespalib/data/simple_buffer.h
+++ b/vespalib/src/vespa/vespalib/data/simple_buffer.h
@@ -4,7 +4,8 @@
#include "input.h"
#include "output.h"
-#include <ostream>
+#include <iosfwd>
+#include <vector>
namespace vespalib {
@@ -24,6 +25,7 @@ private:
public:
SimpleBuffer();
+ ~SimpleBuffer();
Memory obtain() override;
Input &evict(size_t bytes) override;
WritableMemory reserve(size_t bytes) override;
diff --git a/vespalib/src/vespa/vespalib/testkit/test_master.cpp b/vespalib/src/vespa/vespalib/testkit/test_master.cpp
index 45906294a99..9bcadd03fd8 100644
--- a/vespalib/src/vespa/vespalib/testkit/test_master.cpp
+++ b/vespalib/src/vespa/vespalib/testkit/test_master.cpp
@@ -29,6 +29,8 @@ __thread TestMaster::ThreadState *TestMaster::_threadState = 0;
//-----------------------------------------------------------------------------
+TestMaster::TraceItem::~TraceItem() { }
+
TestMaster::ThreadState &
TestMaster::threadState(const vespalib::LockGuard &)
{
diff --git a/vespalib/src/vespa/vespalib/testkit/test_master.h b/vespalib/src/vespa/vespalib/testkit/test_master.h
index 369b3ea918e..1148b1ebb09 100644
--- a/vespalib/src/vespa/vespalib/testkit/test_master.h
+++ b/vespalib/src/vespa/vespalib/testkit/test_master.h
@@ -39,6 +39,7 @@ public:
TraceItem(const std::string &file_in, uint32_t line_in,
const std::string &msg_in)
: file(file_in), line(line_in), msg(msg_in) {}
+ ~TraceItem();
};
private:
diff --git a/vespalib/src/vespa/vespalib/util/thread.cpp b/vespalib/src/vespa/vespalib/util/thread.cpp
index 8160e6d53a8..2170cc36db9 100644
--- a/vespalib/src/vespa/vespalib/util/thread.cpp
+++ b/vespalib/src/vespa/vespalib/util/thread.cpp
@@ -20,6 +20,8 @@ Thread::Proxy::Run(FastOS_ThreadInterface *, void *)
_currentThread = 0;
}
+Thread::Proxy::~Proxy() { }
+
Thread::Thread(Runnable &runnable)
: _proxy(*this, runnable),
_pool(STACK_SIZE, 1),
diff --git a/vespalib/src/vespa/vespalib/util/thread.h b/vespalib/src/vespa/vespalib/util/thread.h
index 96948462ab3..1a87b3bc576 100644
--- a/vespalib/src/vespa/vespalib/util/thread.h
+++ b/vespalib/src/vespa/vespalib/util/thread.h
@@ -27,8 +27,10 @@ private:
Proxy(Thread &parent, Runnable &target)
: thread(parent), runnable(target),
- start(), started(), cancel(false) {}
- virtual void Run(FastOS_ThreadInterface *thisThread, void *arguments);
+ start(), started(), cancel(false) { }
+ ~Proxy();
+
+ void Run(FastOS_ThreadInterface *thisThread, void *arguments) override;
};
Proxy _proxy;
diff --git a/vespalib/src/vespa/vespalib/util/time_tracker.cpp b/vespalib/src/vespa/vespalib/util/time_tracker.cpp
index d8b1f8740a7..7bd863fc898 100644
--- a/vespalib/src/vespa/vespalib/util/time_tracker.cpp
+++ b/vespalib/src/vespa/vespalib/util/time_tracker.cpp
@@ -6,6 +6,8 @@
namespace vespalib {
+TimeTracker::Task::~Task() { }
+
TimeTracker::TimeTracker(uint32_t max_level_in)
: _tasks(),
_current_level(0),
diff --git a/vespalib/src/vespa/vespalib/util/time_tracker.h b/vespalib/src/vespa/vespalib/util/time_tracker.h
index f31ba4305de..7719b3afc2f 100644
--- a/vespalib/src/vespa/vespalib/util/time_tracker.h
+++ b/vespalib/src/vespa/vespalib/util/time_tracker.h
@@ -18,6 +18,7 @@ private:
fastos::StopWatch task_time;
std::vector<Task> sub_tasks;
Task(const char *name_in) : name(name_in), task_time() { task_time.start(); }
+ ~Task();
void close_task() { task_time.stop(); }
double ms() const { return (task_time.elapsed().sec() * 1000.0); }
};
diff --git a/vespalib/src/vespa/vespalib/websocket/buffer.h b/vespalib/src/vespa/vespalib/websocket/buffer.h
index eee9085304a..934983bc737 100644
--- a/vespalib/src/vespa/vespalib/websocket/buffer.h
+++ b/vespalib/src/vespa/vespalib/websocket/buffer.h
@@ -3,8 +3,8 @@
#pragma once
-#include <memory>
#include <vespa/vespalib/stllike/string.h>
+#include <vector>
namespace vespalib {
namespace ws {
diff --git a/vespalib/src/vespa/vespalib/websocket/request.cpp b/vespalib/src/vespa/vespalib/websocket/request.cpp
index d894fdbbb3c..3bb08e9e5a7 100644
--- a/vespalib/src/vespa/vespalib/websocket/request.cpp
+++ b/vespalib/src/vespa/vespalib/websocket/request.cpp
@@ -1,9 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#include <vespa/fastos/fastos.h>
#include "request.h"
-#include <algorithm>
+#include <cassert>
namespace vespalib {
namespace ws {
@@ -32,6 +30,9 @@ void split(vespalib::stringref str, vespalib::stringref sep,
} // namespace vespalib::ws::<unnamed>
+Request::Request() { }
+Request::~Request() { }
+
bool
Request::handle_header(vespalib::string &header_name,
const vespalib::string &header_line)
diff --git a/vespalib/src/vespa/vespalib/websocket/request.h b/vespalib/src/vespa/vespalib/websocket/request.h
index 2c08fb2abe0..8d7993ee372 100644
--- a/vespalib/src/vespa/vespalib/websocket/request.h
+++ b/vespalib/src/vespa/vespalib/websocket/request.h
@@ -24,6 +24,8 @@ private:
const vespalib::string &header_line);
public:
+ Request();
+ ~Request();
bool read_header(Connection &conn);
bool is_get() const { return _method == "GET"; }
const vespalib::string &get_header(const vespalib::string &name) const;
diff --git a/vespalog/src/vespa/log/bufferedlogger.cpp b/vespalog/src/vespa/log/bufferedlogger.cpp
index 76fdcf1f66a..30f3dcb648d 100644
--- a/vespalog/src/vespa/log/bufferedlogger.cpp
+++ b/vespalog/src/vespa/log/bufferedlogger.cpp
@@ -43,6 +43,7 @@ public:
Entry(Logger::LogLevel level, const char* file, int line,
const std::string& token, const std::string& message,
uint64_t timestamp, Logger&);
+ ~Entry();
bool operator==(const Entry& entry) const;
bool operator<(const Entry& entry) const;
@@ -139,6 +140,8 @@ BackingBuffer::Entry::Entry(Logger::LogLevel level, const char* file, int line,
{
}
+BackingBuffer::Entry::~Entry() { }
+
bool
BackingBuffer::Entry::operator==(const Entry& entry) const
{