From 35ca529845de6b4148f6be87aa0b9812315cb4f3 Mon Sep 17 00:00:00 2001 From: Nolan Kramer Date: Thu, 1 May 2025 18:25:49 -0700 Subject: [PATCH 1/3] Exclude math_accuracy tests from ALL_BUILD --- test/math_accuracy/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/math_accuracy/CMakeLists.txt b/test/math_accuracy/CMakeLists.txt index b0d12f1b..7a2e8547 100644 --- a/test/math_accuracy/CMakeLists.txt +++ b/test/math_accuracy/CMakeLists.txt @@ -21,7 +21,7 @@ foreach(SRC ${ARCH_SOURCES}) simdpp_multiarch(ARCH_GEN_SOURCES ${SRC} ${COMPILABLE_ARCHS}) endforeach() -add_executable(test_math_accuracy +add_executable(test_math_accuracy EXCLUDE_FROM_ALL ${SOURCES} ${ARCH_GEN_SOURCES} ) From 699ec3bf4158b9a54473af3baa10aabb1cd5058b Mon Sep 17 00:00:00 2001 From: Nolan Kramer Date: Sun, 4 May 2025 00:20:08 -0700 Subject: [PATCH 2/3] Bring in changes from upstream pr --- simdpp/detail/insn/permute4.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simdpp/detail/insn/permute4.h b/simdpp/detail/insn/permute4.h index 3dbc4f9c..cc56116a 100644 --- a/simdpp/detail/insn/permute4.h +++ b/simdpp/detail/insn/permute4.h @@ -101,7 +101,7 @@ uint32x4 i_permute4(const uint32x4& a) #elif SIMDPP_USE_SSE2 return _mm_shuffle_epi32(a.native(), _MM_SHUFFLE(s3, s2, s1, s0)); #elif SIMDPP_USE_NEON -#if __GNUC__ +#if __GNUC__ && !__clang__ return __builtin_shuffle(a.native(), a.native(), (uint32x4_t){s0, s1, s2, s3}); #else return detail::neon_shuffle_int32x4::permute4(a); @@ -151,7 +151,7 @@ float32x4 i_permute4(const float32x4& a) #elif SIMDPP_USE_SSE2 return _mm_shuffle_ps(a.native(), a.native(), _MM_SHUFFLE(s3, s2, s1, s0)); #elif SIMDPP_USE_NEON -#if __GNUC__ && SIMDPP_USE_NEON_FLT_SP +#if __GNUC__ && !__clang__ && SIMDPP_USE_NEON_FLT_SP return __builtin_shuffle(a.native(), a.native(), (uint32x4_t){s0, s1, s2, s3}); #else return float32x4(detail::neon_shuffle_int32x4::permute4(int32x4(a))); From a186c84cd12cf1e5806e510ccb6e02307c921a6d Mon Sep 17 00:00:00 2001 From: Nolan Kramer Date: Sun, 4 May 2025 00:36:01 -0700 Subject: [PATCH 3/3] Add option to disable tests --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b12b124c..b30b52c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,7 @@ simdpp_get_runnable_archs(NATIVE_ARCHS) set(SIMDPP_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include/${PKG_NAME}-${SIMDPP_API_VERSION}") set(SIMDPP_DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PKG_NAME}") set(SIMDPP_PKGCONFIGDIR "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") +option(LIBSIMDPP_ENABLE_TESTS "Enable libsimdpp tests" ON) configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/libsimdpp.pc.in" @@ -58,4 +59,7 @@ install(FILES enable_testing() add_subdirectory(simdpp) + +if (LIBSIMDPP_ENABLE_TESTS) add_subdirectory(test) +endif()