Skip to content

Commit

Permalink
Workaround for missing intrinsic on gcc < 9
Browse files Browse the repository at this point in the history
  • Loading branch information
borrrden committed May 10, 2024
1 parent 943d08b commit 1bc9b8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions faiss/impl/code_distance/code_distance-avx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
#include <faiss/impl/ProductQuantizer.h>
#include <faiss/impl/code_distance/code_distance-generic.h>

// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78782
#if defined(__GNUC__) && __GNUC__ < 9
#define _mm_loadu_si64(x) (_mm_loadl_epi64((__m128i_u*)x))
#endif

namespace {

inline float horizontal_sum(const __m128 v) {
Expand Down

0 comments on commit 1bc9b8c

Please sign in to comment.