Skip to content

Commit 2712206

Browse files
authored
Zero out other half of int64 for hash (openvinotoolkit#2157)
1 parent 1a58583 commit 2712206

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cpp/src/sequence_group.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ size_t Sequence::_make_hash(size_t content_length) {
6868

6969
std::vector<int64_t> Sequence::_reduce_embedding(const std::vector<float>& embedding) {
7070
size_t res_size = std::min((size_t)ceil(float(embedding.size()) / m_embeddings_hash_calculation_stride), m_embeddings_hash_max_num_values);
71-
std::vector<int64_t> res(res_size);
71+
std::vector<int64_t> res(res_size, 0);
7272
for (size_t i = 0, idx=0; idx < res_size; i+= m_embeddings_hash_calculation_stride, idx++) {
7373
std::memcpy(&(res[idx]), &(embedding[i]), sizeof(embedding[i]));
7474
}

0 commit comments

Comments
 (0)