diff options
9 files changed, 28 insertions, 9 deletions
diff --git a/persistence/src/vespa/persistence/spi/result.cpp b/persistence/src/vespa/persistence/spi/result.cpp index 2e24c9c2f91..e458d58fe69 100644 --- a/persistence/src/vespa/persistence/spi/result.cpp +++ b/persistence/src/vespa/persistence/spi/result.cpp @@ -8,7 +8,9 @@ namespace storage::spi { Result::Result(const Result &) = default; +Result::Result(Result&&) noexcept = default; Result & Result::operator = (const Result &) = default; +Result& Result::operator=(Result&&) noexcept = default; Result::~Result() = default; vespalib::string diff --git a/persistence/src/vespa/persistence/spi/result.h b/persistence/src/vespa/persistence/spi/result.h index 70bd37590a1..c734a885b12 100644 --- a/persistence/src/vespa/persistence/spi/result.h +++ b/persistence/src/vespa/persistence/spi/result.h @@ -36,7 +36,9 @@ public: {} Result(const Result &); + Result(Result&&) noexcept; Result & operator = (const Result &); + Result& operator=(Result&&) noexcept; virtual ~Result(); diff --git a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h index 8040433dbde..8572f7126d6 100644 --- a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h +++ b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h @@ -6,6 +6,7 @@ #include <vespa/searchcorespi/index/ithreadingservice.h> #include <vespa/vespalib/util/threadstackexecutor.h> #include <vespa/vespalib/util/invokeservice.h> +#include <atomic> namespace proton { diff --git a/searchlib/src/vespa/searchlib/transactionlog/ichunk.cpp b/searchlib/src/vespa/searchlib/transactionlog/ichunk.cpp index 99370d263ec..d86d9dc763c 100644 --- a/searchlib/src/vespa/searchlib/transactionlog/ichunk.cpp +++ b/searchlib/src/vespa/searchlib/transactionlog/ichunk.cpp @@ -159,6 +159,9 @@ SerializedChunk::SerializedChunk(std::unique_ptr<CommitChunk> commitChunk, Encod assert(! chunk->getEntries().empty()); encode(_os, *chunk, encoding); } + +SerializedChunk::~SerializedChunk() = default; + vespalib::ConstBufferRef SerializedChunk::getData() const { return vespalib::ConstBufferRef(_os.data(), _os.size()); } diff --git a/searchlib/src/vespa/searchlib/transactionlog/ichunk.h b/searchlib/src/vespa/searchlib/transactionlog/ichunk.h index e5daeb810f4..cf8d12c1feb 100644 --- a/searchlib/src/vespa/searchlib/transactionlog/ichunk.h +++ b/searchlib/src/vespa/searchlib/transactionlog/ichunk.h @@ -42,6 +42,7 @@ public: SerializedChunk(SerializedChunk &&) = default; SerializedChunk & operator=(SerializedChunk &&) = default; SerializedChunk(const SerializedChunk &) = delete; + ~SerializedChunk(); SerializedChunk & operator=(const SerializedChunk &) = delete; vespalib::ConstBufferRef getData() const; SerialNumRange range() const { return _range; } diff --git a/storage/src/vespa/storage/distributor/node_supported_features.h b/storage/src/vespa/storage/distributor/node_supported_features.h index fb9cc68e970..647e063f93e 100644 --- a/storage/src/vespa/storage/distributor/node_supported_features.h +++ b/storage/src/vespa/storage/distributor/node_supported_features.h @@ -13,7 +13,9 @@ namespace storage::distributor { struct NodeSupportedFeatures { bool unordered_merge_chaining = false; - bool operator==(const NodeSupportedFeatures&) const noexcept = default; + bool operator==(const NodeSupportedFeatures& rhs) const noexcept { + return unordered_merge_chaining == rhs.unordered_merge_chaining; + }; }; } diff --git a/vespalib/src/tests/hwaccelrated/hwaccelrated_bench.cpp b/vespalib/src/tests/hwaccelrated/hwaccelrated_bench.cpp index 9984cfca440..4b0141596e7 100644 --- a/vespalib/src/tests/hwaccelrated/hwaccelrated_bench.cpp +++ b/vespalib/src/tests/hwaccelrated/hwaccelrated_bench.cpp @@ -3,7 +3,8 @@ #include <vespa/vespalib/hwaccelrated/iaccelrated.h> #include <vespa/vespalib/hwaccelrated/generic.h> #include <vespa/vespalib/util/time.h> -# +#include <cinttypes> + using namespace vespalib; template<typename T> @@ -28,7 +29,7 @@ benchmarkEuclideanDistance(const hwaccelrated::IAccelrated & accel, size_t sz, s sumOfSums += sum; } duration elapsed = steady_clock::now() - start; - printf("sum=%f of N=%zu and vector length=%zu took %ld\n", sumOfSums, count, sz, count_ms(elapsed)); + printf("sum=%f of N=%zu and vector length=%zu took %" PRId64 "\n", sumOfSums, count, sz, count_ms(elapsed)); } void diff --git a/vespalib/src/tests/invokeservice/invokeservice_test.cpp b/vespalib/src/tests/invokeservice/invokeservice_test.cpp index 22063281950..1d4791f4a33 100644 --- a/vespalib/src/tests/invokeservice/invokeservice_test.cpp +++ b/vespalib/src/tests/invokeservice/invokeservice_test.cpp @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> #include <vespa/vespalib/util/invokeserviceimpl.h> +#include <atomic> using namespace vespalib; diff --git a/vespalib/src/tests/wakeup/wakeup_bench.cpp b/vespalib/src/tests/wakeup/wakeup_bench.cpp index 3661a7c9389..1d9817508d3 100644 --- a/vespalib/src/tests/wakeup/wakeup_bench.cpp +++ b/vespalib/src/tests/wakeup/wakeup_bench.cpp @@ -184,8 +184,10 @@ template <typename T> auto create_list() { return list; } -void destroy_list(auto &list) __attribute__((noinline)); -void destroy_list(auto &list) { +template <typename T> +void destroy_list(T &list) __attribute__((noinline)); +template <typename T> +void destroy_list(T &list) { for (auto *item: list) { item->stop(); item->thread.join(); @@ -193,8 +195,10 @@ void destroy_list(auto &list) { } } -void wait_until_ready(const auto &list) __attribute__((noinline)); -void wait_until_ready(const auto &list) { +template <typename T> +void wait_until_ready(const T &list) __attribute__((noinline)); +template <typename T> +void wait_until_ready(const T &list) { size_t num_ready = 0; do { num_ready = 0; @@ -206,8 +210,10 @@ void wait_until_ready(const auto &list) { } while (num_ready < N); } -auto perform_wakeups(auto &list, size_t target) __attribute__((noinline)); -auto perform_wakeups(auto &list, size_t target) { +template <typename T> +auto perform_wakeups(T &list, size_t target) __attribute__((noinline)); +template <typename T> +auto perform_wakeups(T &list, size_t target) { size_t wake_cnt = 0; size_t skip_cnt = 0; while (wake_cnt < target) { |