-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Description
@yurymalkov Awesome code, really enjoying it compared to the other similar libraries.
Just one remark I noticed here, it seems that the python bindings provided are not actually adding any vector to the index - there is no call to addPoint on the code:
if(normalize==false) {
ParallelFor(start, rows, num_threads, [&](size_t row, size_t threadId) {
size_t id = ids.size() ? ids.at(row) : (cur_l+row);
});
} else{
std::vector<float> norm_array(num_threads * dim);
ParallelFor(start, rows, num_threads, [&](size_t row, size_t threadId) {
// normalize vector:
size_t start_idx = threadId * dim;
normalize_vector((float *) items.data(row), (norm_array.data()+start_idx));
size_t id = ids.size() ? ids.at(row) : (cur_l+row);
});
};
Also, one question. Is the library supposed to be thread safe for adding new items? Or just for performing search?
Metadata
Metadata
Assignees
Labels
No labels