Skip to content

Commit 7c3c17f

Browse files
authored
(#24493) xsimd: simplify test_package
1 parent c8c7b84 commit 7c3c17f

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

recipes/xsimd/all/conanfile.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ def validate(self):
5656
if Version(self.version) < "8.0.0" and is_apple_os(self) and self.settings.arch in ["armv8", "armv8_32", "armv8.3"]:
5757
raise ConanInvalidConfiguration(f"{self.ref} doesn't support macOS M1")
5858

59-
# TODO: There are compilation errors on apple-clang/13.0.0 with cppstd=17
60-
if self.settings.compiler == "apple-clang" and \
61-
Version(self.settings.compiler.version).major <= "13" and \
62-
self.settings.compiler.get_safe("cppstd") in ["17", "gnu17", "20", "gnu20",]:
63-
raise ConanInvalidConfiguration(f"{self.ref} doesn't support apple-clang 13 with cppstd=17 or later")
64-
6559
if self.settings.compiler.get_safe("cppstd"):
6660
check_min_cppstd(self, self._min_cppstd)
6761
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
11
#include "xsimd/xsimd.hpp"
22
#include <iostream>
33

4-
namespace xs = xsimd;
5-
6-
#if XSIMD_VERSION_MAJOR >= 9 && (XSIMD_WITH_NEON64 || XSIMD_WITH_NEON)
7-
using number_type = float;
8-
#else
9-
using number_type = double;
10-
#endif
11-
124
int main(int argc, char *argv[]) {
5+
namespace xs = xsimd;
136
#if XSIMD_VERSION_MAJOR < 8
14-
xs::batch<number_type, 4> a(1.5, 2.5, 3.5, 4.5);
15-
xs::batch<number_type, 4> b(2.5, 3.5, 4.5, 5.5);
16-
#elif XSIMD_VERSION_MAJOR < 9
17-
xs::batch<number_type> a({1.5, 2.5, 3.5, 4.5});
18-
xs::batch<number_type> b({2.5, 3.5, 4.5, 5.5});
7+
xs::batch<double, 2> a(1., 1.);
8+
xs::batch<double, 2> b(2., 2.);
199
#else
20-
xs::batch<number_type> a{1.5, 2.5, 3.5, 4.5};
21-
xs::batch<number_type> b{2.5, 3.5, 4.5, 5.5};
10+
auto a = xs::broadcast(1.);
11+
auto b = xs::broadcast(2.);
2212
#endif
2313

24-
auto mean = (a + b) / 2;
25-
std::cout << mean << std::endl;
14+
auto mean = (a + b) / 2.;
15+
std::cout << "Mean: " << mean << std::endl;
2616
return 0;
2717
}

0 commit comments

Comments
 (0)