From 5bcd3034c691b257544120fc865809e5a05230e8 Mon Sep 17 00:00:00 2001 From: nameczz Date: Tue, 21 Apr 2020 15:53:17 +0800 Subject: [PATCH] remove unused function "normalize_vector" (#2015) Signed-off-by: nameczz --- .../knowhere/index/vector_index/IndexHNSW.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/index/knowhere/knowhere/index/vector_index/IndexHNSW.cpp b/core/src/index/knowhere/knowhere/index/vector_index/IndexHNSW.cpp index 3f744cdb4a..2682af9cf1 100644 --- a/core/src/index/knowhere/knowhere/index/vector_index/IndexHNSW.cpp +++ b/core/src/index/knowhere/knowhere/index/vector_index/IndexHNSW.cpp @@ -28,13 +28,13 @@ namespace milvus { namespace knowhere { -void -normalize_vector(float* data, float* norm_array, size_t dim) { - float norm = 0.0f; - for (int i = 0; i < dim; i++) norm += data[i] * data[i]; - norm = 1.0f / (sqrtf(norm) + 1e-30f); - for (int i = 0; i < dim; i++) norm_array[i] = data[i] * norm; -} +// void +// normalize_vector(float* data, float* norm_array, size_t dim) { +// float norm = 0.0f; +// for (int i = 0; i < dim; i++) norm += data[i] * data[i]; +// norm = 1.0f / (sqrtf(norm) + 1e-30f); +// for (int i = 0; i < dim; i++) norm_array[i] = data[i] * norm; +// } BinarySet IndexHNSW::Serialize(const Config& config) {