Skip to content

Commit

Permalink
default to avx in inner product (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: blaise-muhirwa <[email protected]>
  • Loading branch information
BlaiseMuhirwa and blaise-muhirwa authored Dec 6, 2023
1 parent 9b75e70 commit 2e9f808
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flatnav/distances/InnerProductDistance.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ class InnerProductDistance : public DistanceInterface<InnerProductDistance> {
#endif
if (!(_dimension % 16 == 0)) {
if (_dimension % 4 == 0) {
#if defined(USE_AVX)
_distance_computer = distanceImplInnerProductSIMD4ExtAVX;
#else
_distance_computer = distanceImplInnerProductSIMD4ExtSSE;
#endif
} else if (_dimension > 16) {
_distance_computer = distanceImplInnerProductSIMD16ExtResiduals;
} else if (_dimension > 4) {
Expand Down

0 comments on commit 2e9f808

Please sign in to comment.