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

Support other distance types apart from float #23

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

Dobatymo
Copy link
Collaborator

@Dobatymo Dobatymo commented Aug 2, 2023

this avoids type conversion for discrete metrics like hamming. Currently the tests fail.

@pablocael
Copy link
Owner

I found the issue. The optimized hamming distance that use SIMD instruction actually returns signed int value despite having u64 suffix in name:
Screenshot_20230803_161847
Source: https://learn.microsoft.com/en-us/cpp/intrinsics/x64-amd64-intrinsics-list?view=msvc-170

Can you change to integer value or cast properly within here 🙇

this avoids type conversion for discrete metrics like hamming
@Dobatymo Dobatymo marked this pull request as ready for review August 3, 2023 08:01
@Dobatymo
Copy link
Collaborator Author

Dobatymo commented Aug 3, 2023

@pablocael please check again. The tests are all succeeding now. https://github.com/Dobatymo/pyvptree/actions/runs/5747995002

@pablocael pablocael self-requested a review August 3, 2023 09:19
Copy link
Owner

@pablocael pablocael left a comment

Choose a reason for hiding this comment

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

Nice work! Thanks!
You may merge when you can. Thanks!

@Dobatymo Dobatymo merged commit 61cc736 into pablocael:main Aug 3, 2023
@Dobatymo Dobatymo deleted the generic-typing branch August 3, 2023 13:19
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