From 86ac808fd38e590cdc5c234da9e9ea9f7c38940b Mon Sep 17 00:00:00 2001 From: Lucas Hosseini Date: Tue, 25 Aug 2020 16:56:01 -0700 Subject: [PATCH] Add __builtin_popcountl polyfill. (#1367) Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1367 Test Plan: Imported from OSS Reviewed By: mdouze Differential Revision: D23314742 Pulled By: beauby fbshipit-source-id: f15ae3a06d5cc55d4578443bc56f1af520bbc715 --- faiss/utils/hamming.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/faiss/utils/hamming.h b/faiss/utils/hamming.h index 2d04613ef..072e683c7 100644 --- a/faiss/utils/hamming.h +++ b/faiss/utils/hamming.h @@ -27,6 +27,11 @@ #include +#ifdef _MSC_VER +#include +#define __builtin_popcountl __popcnt64 +#endif // _MSC_VER + #include