summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2017-09-07 10:08:57 +0000
committerGitHub <noreply@github.com>2017-09-07 10:08:57 +0000
commit9c8162a9f042c5cf6bebe6771a74c851d0f419ad (patch)
tree9d776515f9cd9fc4245fc57a032abaee68eeeb45
parentf8f353aa9e2050059672eee72b7945ec56054b42 (diff)
parent61f083cd0303f69a296471259b2582853078caa9 (diff)
Merge pull request #3360 from vespa-engine/balder/use-a-precise-sizing-of-scratch-vector
You do not more place in scratch buffer than the size of the query ve…
-rw-r--r--searchlib/src/vespa/searchlib/features/dotproductfeature.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp
index b1c360b8ffb..cd84eadf536 100644
--- a/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/dotproductfeature.cpp
@@ -108,7 +108,7 @@ template <typename A>
SparseDotProductExecutor<A>::SparseDotProductExecutor(const A * attribute, const V & queryVector, const IV & queryIndexes) :
DotProductExecutor<A>(attribute, queryVector),
_queryIndexes(queryIndexes),
- _scratch(std::max(static_cast<size_t>(attribute->getMaxValueCount()), queryIndexes.size()))
+ _scratch(queryIndexes.size())
{
}