diff options
author | Tor Egge <Tor.Egge@online.no> | 2021-08-23 13:02:31 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2021-08-23 13:02:31 +0200 |
commit | 11d711eb609fd2708e2ee4737c8a48570222d9f3 (patch) | |
tree | ff8b3606fa8e1869c777683c05f42bb7a269da1d /vespalib/src | |
parent | 3670d3e8b892e57854f050daabacc762f059effa (diff) |
Remove unused variables.
Diffstat (limited to 'vespalib/src')
-rw-r--r-- | vespalib/src/tests/dotproduct/dotproductbenchmark.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp b/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp index e95e8a5c58b..5d7817bc59b 100644 --- a/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp +++ b/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp @@ -5,6 +5,7 @@ #include <iostream> #include <vector> #include <thread> +#include <functional> using namespace vespalib; using vespalib::hwaccelrated::IAccelrated; @@ -106,6 +107,8 @@ SparseBenchmark::SparseBenchmark(size_t numDocs, size_t numValues, size_t numQue } SparseBenchmark::~SparseBenchmark() = default; +std::function<void(int)> use_sum = [](int) noexcept { }; + class UnorderedSparseBenchmark : public SparseBenchmark { private: @@ -124,6 +127,7 @@ private: sum += static_cast<int64_t>(_values[offset + i]._value) * it->second; } } + use_sum(sum); } map _query; }; @@ -154,6 +158,7 @@ private: sum += static_cast<int64_t>(_values[offset + b]._value) * _query[a]._value; } } + use_sum(sum); } std::vector<P> _query; }; |