summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-03-10 20:09:22 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-03-10 20:09:22 +0000
commit8d52222315d29507930750941e268491ade98934 (patch)
tree5762764d05bd1cd1350a35594b347ef6448b97cc /searchlib
parent03bd3b755650d828e63458379d5c120da63d7221 (diff)
Followup from code review.
- Update copyright - euclidian -> euclidean - better testdata.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/tensor/distance_functions.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/tensor/distance_functions.h b/searchlib/src/vespa/searchlib/tensor/distance_functions.h
index 5af69a3a0af..09f538269d8 100644
--- a/searchlib/src/vespa/searchlib/tensor/distance_functions.h
+++ b/searchlib/src/vespa/searchlib/tensor/distance_functions.h
@@ -10,6 +10,7 @@ namespace search::tensor {
/**
* Calculates the square of the standard Euclidean distance.
+ * Will use instruction optimal for the cpu it is running on.
*/
template <typename FloatType>
class SquaredEuclideanDistance : public DistanceFunction {
@@ -22,7 +23,7 @@ public:
auto rhs_vector = rhs.typify<FloatType>();
size_t sz = lhs_vector.size();
assert(sz == rhs_vector.size());
- return _computer->squaredEuclidianDistance(&lhs_vector[0], &rhs_vector[0], sz);
+ return _computer->squaredEuclideanDistance(&lhs_vector[0], &rhs_vector[0], sz);
}
vespalib::hwaccelrated::IAccelrated::UP _computer;
};