Skip to content

Commit c4b88a7

Browse files
committed
Additional commits to make AVX2 work with MSVC
Note that this requires the /openmp:llvm option to be enabled. The `_OPENMP` define is the same between /openmp and /openmp:llvm meaning there is no way to tell whether or not unsigned index types in OpenMP loops are usable, and thus cannot be switched between at compile time.
1 parent 422ac74 commit c4b88a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

faiss/impl/platform_macros.h

+5
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ inline int __builtin_clzll(uint64_t x) {
6666
#define __builtin_popcount __popcnt
6767
#define __builtin_popcountl __popcnt64
6868

69+
#ifndef __clang__
70+
#define __m128i_u __m128i
71+
#define __m256i_u __m256i
72+
#endif
73+
6974
// MSVC does not define __SSEx__, and _M_IX86_FP is only defined on 32-bit
7075
// processors cf.
7176
// https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros

0 commit comments

Comments
 (0)