Skip to content

Commit b6868c2

Browse files
authored
Merge pull request #970 from xtensor-stack/feature/test-apple-m1
Run tests on Apple M1
2 parents 38f15d3 + 9754aa9 commit b6868c2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/macos.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ jobs:
88
strategy:
99
matrix:
1010
os:
11-
- 11
1211
- 12
12+
- 13
13+
- 14
1314
runs-on: macos-${{ matrix.os }}
1415
name: 'macos-${{ matrix.os }}'
1516
steps:

test/test_xsimd_api.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,11 @@ struct xsimd_api_float_types_functions
665665
{
666666
value_type val0(3);
667667
value_type val1(4);
668-
#ifndef EMSCRIPTEN
669-
CHECK_EQ(extract(xsimd::polar(T(val0), T(val1))), std::polar(val0, val1));
670-
#else
668+
#if defined(EMSCRIPTEN) || (defined(__APPLE__) && defined(XSIMD_WITH_NEON64))
671669
CHECK_EQ(std::real(extract(xsimd::polar(T(val0), T(val1)))), doctest::Approx(std::real(std::polar(val0, val1))));
672670
CHECK_EQ(std::imag(extract(xsimd::polar(T(val0), T(val1)))), doctest::Approx(std::imag(std::polar(val0, val1))));
671+
#else
672+
CHECK_EQ(extract(xsimd::polar(T(val0), T(val1))), std::polar(val0, val1));
673673
#endif
674674
}
675675
void test_pow()

0 commit comments

Comments
 (0)