commit 4f24a69d3004bcbe96853961b312ab2749235020
Author: Jakub Bogusz <[email protected]>
Date:   Thu Feb 1 21:00:00 2024 +0100

    - updated to 12.1.1 (DEVEL branch: xtensor 0.25.0 is not ready for)

 xsimd-batch.patch | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 xsimd.spec        | 17 ++++++++++++++---
 2 files changed, 67 insertions(+), 3 deletions(-)
---
diff --git a/xsimd.spec b/xsimd.spec
index cf95fbf..2680d72 100644
--- a/xsimd.spec
+++ b/xsimd.spec
@@ -1,20 +1,23 @@
 #
 # Conditional build:
 %bcond_without apidocs         # API documentation
+%bcond_with    tests           # building tests and benchmarks
 %bcond_with    xtl             # XTL xcomplex support
 #
 Summary:       C++ wrappers for SIMD intrinsics
 Summary(pl.UTF-8):     Opakowanie C++ dla operacji SIMD
 Name:          xsimd
-Version:       11.1.0
+Version:       12.1.1
 Release:       1
 License:       BSD
 Group:         Libraries
 #Source0Download: https://github.com/xtensor-stack/xsimd/tags
 Source0:       
https://github.com/xtensor-stack/xsimd/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 29ffd841d6491fddfbfaedeffc637f02
+# Source0-md5: e8887de343bd6036bdfa1f4a4752dc64
+Patch0:                %{name}-batch.patch
 URL:           https://xsimd.readthedocs.io/
 BuildRequires: cmake >= 3.1
+%{?with_tests:BuildRequires:   doctest >= 2.4.9}
 BuildRequires: libstdc++-devel >= 6:4.7
 %{?with_xtl:BuildRequires:     libstdc++-devel >= 6:5}
 BuildRequires: rpmbuild(macros) >= 1.605
@@ -28,6 +31,11 @@ BuildRequires:       sphinx-pdg-3
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%if %{with tests}
+# SSE2 is the lowest supported path
+%define                specflags_ia32  -msse2
+%endif
+
 %description
 SIMD (Single Instruction, Multiple Data) is a feature of
 microprocessors that has been available for many years. SIMD
@@ -105,13 +113,16 @@ Dokumentacja API biblioteki xsimd.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 install -d build
 cd build
 # fake LIBDIR so we can create noarch package
 %cmake .. \
-       -DCMAKE_INSTALL_LIBDIR=%{_datadir}
+       -DCMAKE_INSTALL_LIBDIR=%{_datadir} \
+       %{?with_tests:-DBUILD_BENCHMARK=ON} \
+       %{?with_tests:-DBUILD_TESTS=ON}
 
 %{__make}
 cd ..
diff --git a/xsimd-batch.patch b/xsimd-batch.patch
new file mode 100644
index 0000000..5ce2c91
--- /dev/null
+++ b/xsimd-batch.patch
@@ -0,0 +1,53 @@
+--- xsimd-12.1.1/benchmark/xsimd_benchmark.hpp.orig    2023-12-12 
17:17:27.000000000 +0100
++++ xsimd-12.1.1/benchmark/xsimd_benchmark.hpp 2024-01-27 17:26:01.805384962 
+0100
+@@ -337,11 +337,11 @@ namespace xsimd
+         duration_type t_double_scalar = benchmark_scalar(f, d_lhs, d_res, 
iter);
+ #endif
+ 
+-        duration_type t_float_vector = benchmark_simd<batch<float>>(f, f_lhs, 
f_res, iter);
+-        duration_type t_float_vector_u = 
benchmark_simd_unrolled<batch<float>>(f, f_lhs, f_res, iter);
++        duration_type t_float_vector = benchmark_simd<batch<float, 
default_arch>>(f, f_lhs, f_res, iter);
++        duration_type t_float_vector_u = benchmark_simd_unrolled<batch<float, 
default_arch>>(f, f_lhs, f_res, iter);
+ #if !XSIMD_WITH_NEON || XSIMD_WITH_NEON64
+-        duration_type t_double_vector = benchmark_simd<batch<double>>(f, 
d_lhs, d_res, iter);
+-        duration_type t_double_vector_u = 
benchmark_simd_unrolled<batch<double>>(f, d_lhs, d_res, iter);
++        duration_type t_double_vector = benchmark_simd<batch<double, 
default_arch>>(f, d_lhs, d_res, iter);
++        duration_type t_double_vector_u = 
benchmark_simd_unrolled<batch<double, default_arch>>(f, d_lhs, d_res, iter);
+ #endif
+ 
+         out << "============================" << std::endl;
+@@ -372,13 +372,13 @@ namespace xsimd
+         init_benchmark(d_lhs, d_rhs, d_res, size);
+ 
+         duration_type t_float_scalar = benchmark_scalar(f, f_lhs, f_rhs, 
f_res, iter);
+-        duration_type t_float_vector = benchmark_simd<batch<float>>(f, f_lhs, 
f_rhs, f_res, iter);
+-        duration_type t_float_vector_u = 
benchmark_simd_unrolled<batch<float>>(f, f_lhs, f_rhs, f_res, iter);
++        duration_type t_float_vector = benchmark_simd<batch<float, 
default_arch>>(f, f_lhs, f_rhs, f_res, iter);
++        duration_type t_float_vector_u = benchmark_simd_unrolled<batch<float, 
default_arch>>(f, f_lhs, f_rhs, f_res, iter);
+ 
+         duration_type t_double_scalar = benchmark_scalar(f, d_lhs, d_rhs, 
d_res, iter);
+ #if !XSIMD_WITH_NEON || XSIMD_WITH_NEON64
+-        duration_type t_double_vector = benchmark_simd<batch<double>>(f, 
d_lhs, d_rhs, d_res, iter);
+-        duration_type t_double_vector_u = 
benchmark_simd_unrolled<batch<double>>(f, d_lhs, d_rhs, d_res, iter);
++        duration_type t_double_vector = benchmark_simd<batch<double, 
default_arch>>(f, d_lhs, d_rhs, d_res, iter);
++        duration_type t_double_vector_u = 
benchmark_simd_unrolled<batch<double, default_arch>>(f, d_lhs, d_rhs, d_res, 
iter);
+ #endif
+ 
+         out << "============================" << std::endl;
+@@ -404,12 +404,12 @@ namespace xsimd
+         init_benchmark(d_op0, d_op1, d_op2, d_res, size);
+ 
+         duration_type t_float_scalar = benchmark_scalar(f, f_op0, f_op1, 
f_op2, f_res, iter);
+-        duration_type t_float_vector = benchmark_simd<batch<float>>(f, f_op0, 
f_op1, f_op2, f_res, iter);
+-        duration_type t_float_vector_u = 
benchmark_simd_unrolled<batch<float>>(f, f_op0, f_op1, f_op2, f_res, iter);
++        duration_type t_float_vector = benchmark_simd<batch<float, 
default_arch>>(f, f_op0, f_op1, f_op2, f_res, iter);
++        duration_type t_float_vector_u = benchmark_simd_unrolled<batch<float, 
default_arch>>(f, f_op0, f_op1, f_op2, f_res, iter);
+         duration_type t_double_scalar = benchmark_scalar(f, d_op0, d_op1, 
d_op2, d_res, iter);
+ #if !XSIMD_WITH_NEON || XSIMD_WITH_NEON64
+-        duration_type t_double_vector = benchmark_simd<batch<double>>(f, 
d_op0, d_op1, d_op2, d_res, iter);
+-        duration_type t_double_vector_u = 
benchmark_simd_unrolled<batch<double>>(f, d_op0, d_op1, d_op2, d_res, iter);
++        duration_type t_double_vector = benchmark_simd<batch<double, 
default_arch>>(f, d_op0, d_op1, d_op2, d_res, iter);
++        duration_type t_double_vector_u = 
benchmark_simd_unrolled<batch<double, default_arch>>(f, d_op0, d_op1, d_op2, 
d_res, iter);
+ #endif
+ 
+         out << "============================" << std::endl;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xsimd.git/commitdiff/4f24a69d3004bcbe96853961b312ab2749235020

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to