Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segmentation fault on querying with few candidates #29

Merged

Conversation

Hi-king
Copy link
Contributor

@Hi-king Hi-king commented Nov 20, 2018

This will fix issue #28

// we terminate the process and do the final reranking
if ( (size_t) coarse_cnt == w) {
if ( (size_t) coarse_cnt == w && scores.size() >= (unsigned long) topk) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

topk sort should not be performed with candidates fewer than k

@matsui528
Copy link
Owner

This is true indeed. Thanks for catching it up!

@matsui528 matsui528 merged commit 5d592ca into matsui528:master Nov 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants