Skip to content

Commit 324426d

Browse files
author
Tony Kuo
committed
fix logic for AVX
1 parent 641e62b commit 324426d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hnswlib/space_ip.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,13 @@ namespace hnswlib {
297297
InnerProductSIMD16Ext = InnerProductSIMD16ExtAVX512;
298298
else if (AVXCapable())
299299
InnerProductSIMD16Ext = InnerProductSIMD16ExtAVX;
300+
#elif defined(USE_AVX)
301+
if (AVXCapable())
302+
InnerProductSIMD16Ext = InnerProductSIMD16ExtAVX;
300303
#endif
301304
#if defined(USE_AVX)
302-
if (AVXCapable()) {
303-
InnerProductSIMD16Ext = InnerProductSIMD16ExtAVX;
305+
if (AVXCapable())
304306
InnerProductSIMD4Ext = InnerProductSIMD4ExtAVX;
305-
}
306307
#endif
307308

308309
if (dim % 16 == 0)

0 commit comments

Comments
 (0)