Add iterator support to brute force search#369
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zhengbuqian The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@zhengbuqian 🔍 Important: PR Classification Needed! For efficient project management and a seamless review process, it's essential to classify your PR correctly. Here's how:
For any PR outside the kind/improvement category, ensure you link to the associated issue using the format: “issue: #”. Thanks for your efforts and contribution to the community!. |
src/common/comp/brute_force.cc
Outdated
| } | ||
| size_t current_end = std::min(results_.size(), sorted_ + sort_size_); | ||
| std::nth_element(results_.begin() + sorted_, results_.begin() + current_end, results_.end(), comp_); | ||
| std::sort(results_.begin() + sorted_, results_.begin() + current_end, comp_); |
There was a problem hiding this comment.
std::partial_sort()
src/common/comp/brute_force.cc
Outdated
| std::vector<std::pair<float, int64_t>> results_; | ||
| size_t next_ = 0; | ||
| size_t sorted_ = 0; | ||
| size_t sort_size_; |
There was a problem hiding this comment.
size_t sort_size_ = 0;
|
/lgtm |
…types Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
0a526c8 to
beb2cc8
Compare
Signed-off-by: Buqian Zheng <zhengbuqian@gmail.com>
|
/lgtm |
|
issue: #367 both this and IVFFLAT iterators are for growing segment, using that as the umbrella issue |
issue: #367
added unit test for fp32 type
milvus-io/milvus#30307
/kind enhancement