forked from centreborelli/s2p
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from 20treeAI/feat/compile_on_mac_os
feat: enable native compilation on Mac OS / Apple Silicon
- Loading branch information
Showing
12 changed files
with
194 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
diff --git a/3rdparty/homography/LibHomography/Splines.h b/3rdparty/homography/LibHomography/Splines.h | ||
index 56a36f1..46a123d 100644 | ||
--- a/3rdparty/homography/LibHomography/Splines.h | ||
+++ b/3rdparty/homography/LibHomography/Splines.h | ||
@@ -5,8 +5,7 @@ | ||
//! Global includes | ||
#include <cstdlib> | ||
#include <cmath> | ||
-#include <xmmintrin.h> | ||
-#include <x86intrin.h> | ||
+#include "../../sse2neon/sse2neon.h" | ||
|
||
|
||
//! Local includes | ||
diff --git a/3rdparty/homography/LibImages/LibImages.cpp b/3rdparty/homography/LibImages/LibImages.cpp | ||
index 7c1f6f5..fd75fb4 100644 | ||
--- a/3rdparty/homography/LibImages/LibImages.cpp | ||
+++ b/3rdparty/homography/LibImages/LibImages.cpp | ||
@@ -14,8 +14,7 @@ | ||
#ifdef _OPENMP | ||
#include <omp.h> | ||
#endif | ||
-#include <xmmintrin.h> | ||
-#include <x86intrin.h> | ||
+#include "../../sse2neon/sse2neon.h" | ||
#include <cmath> | ||
#include <algorithm> | ||
#include <cstring> | ||
diff --git a/3rdparty/homography/LibImages/LibImages.h b/3rdparty/homography/LibImages/LibImages.h | ||
index 51233a3..8ae589d 100644 | ||
--- a/3rdparty/homography/LibImages/LibImages.h | ||
+++ b/3rdparty/homography/LibImages/LibImages.h | ||
@@ -5,8 +5,7 @@ | ||
#include <stdlib.h> | ||
#include <string> | ||
#include <vector> | ||
-#include <xmmintrin.h> | ||
-#include <x86intrin.h> | ||
+#include "../../sse2neon/sse2neon.h" | ||
|
||
//! Local includes | ||
|
||
diff --git a/3rdparty/homography/Utilities/Utilities.h b/3rdparty/homography/Utilities/Utilities.h | ||
index cc80a22..ee45bf9 100644 | ||
--- a/3rdparty/homography/Utilities/Utilities.h | ||
+++ b/3rdparty/homography/Utilities/Utilities.h | ||
@@ -8,8 +8,8 @@ | ||
#include <sstream> | ||
#include <iostream> | ||
#include <iomanip> | ||
-#include <xmmintrin.h> | ||
-#include <x86intrin.h> | ||
+#include "../../sse2neon/sse2neon.h" | ||
+ | ||
#include <vector> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/3rdparty/iio/iio.c b/3rdparty/iio/iio.c | ||
index 5bff3d8..67b06ac 100644 | ||
--- a/3rdparty/iio/iio.c | ||
+++ b/3rdparty/iio/iio.c | ||
@@ -535,7 +535,9 @@ int iio_type_id(size_t sample_size, bool ieeefp_sample, bool signed_sample) | ||
switch(sample_size) { | ||
case sizeof(float): return IIO_TYPE_FLOAT; | ||
case sizeof(double): return IIO_TYPE_DOUBLE; | ||
- case sizeof(long double): return IIO_TYPE_LONGDOUBLE; | ||
+ #ifdef I_CAN_HAS_LONGDOUBLE | ||
+ case sizeof(long double): return IIO_TYPE_LONGDOUBLE; | ||
+ #endif//I_CAN_HAS_LONGDOUBLE | ||
case sizeof(float)/2: return IIO_TYPE_HALF; | ||
default: fail("bad float size %zu", sample_size); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/3rdparty/imscript/src/iio.c b/3rdparty/imscript/src/iio.c | ||
index 2516713..8428556 100644 | ||
--- a/3rdparty/imscript/src/iio.c | ||
+++ b/3rdparty/imscript/src/iio.c | ||
@@ -535,7 +535,9 @@ int iio_type_id(size_t sample_size, bool ieeefp_sample, bool signed_sample) | ||
switch(sample_size) { | ||
case sizeof(float): return IIO_TYPE_FLOAT; | ||
case sizeof(double): return IIO_TYPE_DOUBLE; | ||
- case sizeof(long double): return IIO_TYPE_LONGDOUBLE; | ||
+ #ifdef I_CAN_HAS_LONGDOUBLE | ||
+ case sizeof(long double): return IIO_TYPE_LONGDOUBLE; | ||
+ #endif//I_CAN_HAS_LONGDOUBLE | ||
case sizeof(float)/2: return IIO_TYPE_HALF; | ||
default: fail("bad float size %zu", sample_size); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/3rdparty/mgm/iio/iio.c b/3rdparty/mgm/iio/iio.c | ||
index 4a678db..33de681 100644 | ||
--- a/3rdparty/mgm/iio/iio.c | ||
+++ b/3rdparty/mgm/iio/iio.c | ||
@@ -489,7 +489,9 @@ int iio_type_id(size_t sample_size, bool ieeefp_sample, bool signed_sample) | ||
switch(sample_size) { | ||
case sizeof(float): return IIO_TYPE_FLOAT; | ||
case sizeof(double): return IIO_TYPE_DOUBLE; | ||
- case sizeof(long double): return IIO_TYPE_LONGDOUBLE; | ||
+ #ifdef I_CAN_HAS_LONGDOUBLE | ||
+ case sizeof(long double): return IIO_TYPE_LONGDOUBLE; | ||
+ #endif//I_CAN_HAS_LONGDOUBLE | ||
case sizeof(float)/2: return IIO_TYPE_HALF; | ||
default: fail("bad float size %zu", sample_size); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/3rdparty/mgm_multi/iio/iio.c b/3rdparty/mgm_multi/iio/iio.c | ||
index 9f28831..7475497 100644 | ||
--- a/3rdparty/mgm_multi/iio/iio.c | ||
+++ b/3rdparty/mgm_multi/iio/iio.c | ||
@@ -511,8 +511,10 @@ int iio_type_id(size_t sample_size, bool ieeefp_sample, bool signed_sample) | ||
switch(sample_size) { | ||
case sizeof(float): return IIO_TYPE_FLOAT; | ||
case sizeof(double): return IIO_TYPE_DOUBLE; | ||
- case sizeof(long double): return IIO_TYPE_LONGDOUBLE; | ||
- case sizeof(float)/2: return IIO_TYPE_HALF; | ||
+ #ifdef I_CAN_HAS_LONGDOUBLE | ||
+ case sizeof(long double): return IIO_TYPE_LONGDOUBLE; | ||
+ #endif//I_CAN_HAS_LONGDOUBLE | ||
+ case sizeof(float)/2: return IIO_TYPE_HALF; | ||
default: fail("bad float size %zu", sample_size); | ||
} | ||
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git a/3rdparty/sift/simd/LibImages/LibImages.cpp b/3rdparty/sift/simd/LibImages/LibImages.cpp | ||
index 6acbe4e..870d80b 100644 | ||
--- a/3rdparty/sift/simd/LibImages/LibImages.cpp | ||
+++ b/3rdparty/sift/simd/LibImages/LibImages.cpp | ||
@@ -10,8 +10,7 @@ | ||
#ifdef _OPENMP | ||
#include <omp.h> | ||
#endif | ||
-#include <xmmintrin.h> | ||
-#include <x86intrin.h> | ||
+#include "../../sse2neon/sse2neon.h" | ||
#include <cmath> | ||
#include <algorithm> | ||
#include <cstring> | ||
diff --git a/3rdparty/sift/simd/LibImages/LibImages.h b/3rdparty/sift/simd/LibImages/LibImages.h | ||
index 9918472..c8c5db1 100644 | ||
--- a/3rdparty/sift/simd/LibImages/LibImages.h | ||
+++ b/3rdparty/sift/simd/LibImages/LibImages.h | ||
@@ -5,8 +5,7 @@ | ||
#include <stdlib.h> | ||
#include <string> | ||
#include <vector> | ||
-#include <xmmintrin.h> | ||
-#include <x86intrin.h> | ||
+#include "../../../sse2neon/sse2neon.h" | ||
|
||
//! Local includes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/3rdparty/tvl1flow/iio.c b/3rdparty/tvl1flow/iio.c | ||
index 9f28831..e27955e 100644 | ||
--- a/3rdparty/tvl1flow/iio.c | ||
+++ b/3rdparty/tvl1flow/iio.c | ||
@@ -511,7 +511,9 @@ int iio_type_id(size_t sample_size, bool ieeefp_sample, bool signed_sample) | ||
switch(sample_size) { | ||
case sizeof(float): return IIO_TYPE_FLOAT; | ||
case sizeof(double): return IIO_TYPE_DOUBLE; | ||
- case sizeof(long double): return IIO_TYPE_LONGDOUBLE; | ||
+ #ifdef I_CAN_HAS_LONGDOUBLE | ||
+ case sizeof(long double): return IIO_TYPE_LONGDOUBLE; | ||
+ #endif//I_CAN_HAS_LONGDOUBLE | ||
case sizeof(float)/2: return IIO_TYPE_HALF; | ||
default: fail("bad float size %zu", sample_size); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import os | ||
|
||
def pytest_sessionstart(): | ||
os.environ['PATH'] = os.environ['PATH'] + os.pathsep + "/opt/homebrew/Caskroom/miniconda/base/envs/s2p/lib" |