vcpkg/ports/nmslib/fix-headers.patch
Jacob Zhong 9db298e34a Add package NMSLiB (#2875)
* [nmslib] Init port

* [nmslib] Trying extra building
2018-02-27 07:05:18 -08:00

93 lines
3.0 KiB
Diff

diff --git a/similarity_search/src/method/hnsw.cc b/similarity_search/src/method/hnsw.cc
index 30a7c8a..5ca07c5 100644
--- a/similarity_search/src/method/hnsw.cc
+++ b/similarity_search/src/method/hnsw.cc
@@ -27,7 +27,7 @@
#include <iostream>
#include <memory>
// This is only for _mm_prefetch
-#include <mmintrin.h>
+#include <xmmintrin.h>
#include "portable_simd.h"
#include "knnquery.h"
diff --git a/similarity_search/src/method/hnsw_distfunc_opt.cc b/similarity_search/src/method/hnsw_distfunc_opt.cc
index 168ee81..408d95d 100644
--- a/similarity_search/src/method/hnsw_distfunc_opt.cc
+++ b/similarity_search/src/method/hnsw_distfunc_opt.cc
@@ -30,7 +30,7 @@
#include "rangequery.h"
#include "portable_intrinsics.h"
// This is only for _mm_prefetch
-#include <mmintrin.h>
+#include <xmmintrin.h>
#include "space.h"
#include "sort_arr_bi.h"
diff --git a/similarity_search/src/method/pivot_neighb_invindx.cc b/similarity_search/src/method/pivot_neighb_invindx.cc
index b6473bd..6dcb00f 100644
--- a/similarity_search/src/method/pivot_neighb_invindx.cc
+++ b/similarity_search/src/method/pivot_neighb_invindx.cc
@@ -21,7 +21,7 @@
#include <unordered_map>
// This is only for _mm_prefetch
-#include <mmintrin.h>
+#include <xmmintrin.h>
#include "portable_simd.h"
#include "space.h"
diff --git a/similarity_search/src/method/small_world_rand.cc b/similarity_search/src/method/small_world_rand.cc
index 59e13f7..0f3e0b9 100644
--- a/similarity_search/src/method/small_world_rand.cc
+++ b/similarity_search/src/method/small_world_rand.cc
@@ -16,7 +16,7 @@
#include <memory>
#include <iostream>
// This is only for _mm_prefetch
-#include <mmintrin.h>
+#include <xmmintrin.h>
#include "portable_simd.h"
#include "space.h"
diff --git a/similarity_search/src/method/vptree.cc b/similarity_search/src/method/vptree.cc
index d0262ad..0e5befc 100644
--- a/similarity_search/src/method/vptree.cc
+++ b/similarity_search/src/method/vptree.cc
@@ -20,7 +20,7 @@
#include <cmath>
// This is only for _mm_prefetch
-#include <mmintrin.h>
+#include <xmmintrin.h>
#include "portable_simd.h"
#include "space.h"
diff --git a/similarity_search/test/test_overlap.cc b/similarity_search/test/test_overlap.cc
index 326b26b..413d66d 100644
--- a/similarity_search/test/test_overlap.cc
+++ b/similarity_search/test/test_overlap.cc
@@ -12,7 +12,6 @@
* Apache License Version 2.0 http://www.apache.org/licenses/.
*
*/
-#include <sys/time.h>
#include <logging.h>
#include <idtype.h>
diff --git a/similarity_search/test/test_pow.cc b/similarity_search/test/test_pow.cc
index 1b46a68..faaa84e 100644
--- a/similarity_search/test/test_pow.cc
+++ b/similarity_search/test/test_pow.cc
@@ -29,8 +29,8 @@ using namespace std;
const float MAX_REL_DIFF = 1e-6f;
-vector<float> addExps = { 0, 0.125, 0.25, 0.5 };
-vector<float> vals = { 0.1, 0.5, 1, 1.5, 2, 4};
+vector<float> addExps = { 0, 0.125f, 0.25f, 0.5f };
+vector<float> vals = { 0.1f, 0.5f, 1, 1.5f, 2, 4};
vector<float> signs = { 1, -1};
template <typename T> bool runTest() {