diff --git a/third_party/xsimd/Changelog.rst b/third_party/xsimd/Changelog.rst index c4c841bea215..0b2f663ba7a3 100644 --- a/third_party/xsimd/Changelog.rst +++ b/third_party/xsimd/Changelog.rst @@ -9,6 +9,27 @@ Changelog ========= +13.2.0 +------ + + * Added broadcast overload for bool + + * Fixed kernel::store for booleans + + * Explicitly verify dependency between architectures (like sse2 implies sse2) + + * Use default arch alignment as default alignment for xsimd::aligned_allocator + + * sse2 version of xsimd::swizzle on [u]int16_t + + * avx implementation of transpose for [u]int[8|16] + + * Implement [u]int8 and [u]int16 matrix transpose for 128 bit registers + + * Fix minor warning + + * Fix fma4 support + 13.1.0 ------ diff --git a/third_party/xsimd/include/xsimd/arch/generic/xsimd_generic_memory.hpp b/third_party/xsimd/include/xsimd/arch/generic/xsimd_generic_memory.hpp index eb683738de85..badd0e3844f7 100644 --- a/third_party/xsimd/include/xsimd/arch/generic/xsimd_generic_memory.hpp +++ b/third_party/xsimd/include/xsimd/arch/generic/xsimd_generic_memory.hpp @@ -32,6 +32,32 @@ namespace xsimd using namespace types; + // broadcast + namespace detail + { + template + struct broadcaster + { + using return_type = batch; + + static XSIMD_INLINE return_type run(T v) noexcept + { + return return_type::broadcast(v); + } + }; + + template + struct broadcaster + { + using return_type = batch_bool, A>; + + static XSIMD_INLINE return_type run(bool b) noexcept + { + return return_type(b); + } + }; + } + // compress namespace detail { @@ -514,7 +540,7 @@ namespace xsimd } // store - template + template XSIMD_INLINE void store(batch_bool const& self, bool* mem, requires_arch) noexcept { using batch_type = batch; diff --git a/third_party/xsimd/include/xsimd/config/xsimd_config.hpp b/third_party/xsimd/include/xsimd/config/xsimd_config.hpp index d756f8817d26..985a70a9b6e7 100644 --- a/third_party/xsimd/include/xsimd/config/xsimd_config.hpp +++ b/third_party/xsimd/include/xsimd/config/xsimd_config.hpp @@ -13,7 +13,7 @@ #define XSIMD_CONFIG_HPP #define XSIMD_VERSION_MAJOR 13 -#define XSIMD_VERSION_MINOR 1 +#define XSIMD_VERSION_MINOR 2 #define XSIMD_VERSION_PATCH 0 /** diff --git a/third_party/xsimd/include/xsimd/types/xsimd_api.hpp b/third_party/xsimd/include/xsimd/types/xsimd_api.hpp index 7aa7cc0d67d9..7cecb6ca110b 100644 --- a/third_party/xsimd/include/xsimd/types/xsimd_api.hpp +++ b/third_party/xsimd/include/xsimd/types/xsimd_api.hpp @@ -236,7 +236,7 @@ namespace xsimd /** * @ingroup batch_conversion * - * Perform a static_cast from \c T_in to \c T_out on \c \c x. + * Perform a static_cast from \c T_in to \c T_out on \c x. * @param x batch_bool of \c T_in * @return \c x cast to \c T_out */ @@ -252,7 +252,7 @@ namespace xsimd /** * @ingroup batch_conversion * - * Perform a static_cast from \c T_in to \c T_out on \c \c x. + * Perform a static_cast from \c T_in to \c T_out on \c x. * @param x batch of \c T_in * @return \c x cast to \c T_out */ @@ -486,15 +486,17 @@ namespace xsimd /** * @ingroup batch_data_transfer * - * Creates a batch from the single value \c v. + * Creates a batch from the single value \c v. If \c v is a boolean, + * this function returns a batch_bool. If you need another type + * of batch_bool, please use \c broadcast_as instead. * @param v the value used to initialize the batch * @return a new batch instance */ template - XSIMD_INLINE batch broadcast(T v) noexcept + XSIMD_INLINE typename kernel::detail::broadcaster::return_type broadcast(T v) noexcept { detail::static_check_supported_config(); - return batch::broadcast(v); + return kernel::detail::broadcaster::run(v); } /** diff --git a/third_party/xsimd/include/xsimd/types/xsimd_traits.hpp b/third_party/xsimd/include/xsimd/types/xsimd_traits.hpp index c6436aef7174..0d5565b787e9 100644 --- a/third_party/xsimd/include/xsimd/types/xsimd_traits.hpp +++ b/third_party/xsimd/include/xsimd/types/xsimd_traits.hpp @@ -77,6 +77,11 @@ namespace xsimd "usage of batch type with unsupported type"); }; + template + struct static_check_supported_config_emitter : static_check_supported_config_emitter, A> + { + }; + template struct static_check_supported_config_emitter, A> : static_check_supported_config_emitter { diff --git a/third_party/xsimd/include/xsimd/types/xsimd_utils.hpp b/third_party/xsimd/include/xsimd/types/xsimd_utils.hpp index aa890f2410b3..0aec70c1d7e3 100644 --- a/third_party/xsimd/include/xsimd/types/xsimd_utils.hpp +++ b/third_party/xsimd/include/xsimd/types/xsimd_utils.hpp @@ -77,6 +77,12 @@ namespace xsimd { }; + template <> + struct as_unsigned_integer + { + using type = uint8_t; + }; + template <> struct as_unsigned_integer { diff --git a/third_party/xsimd/moz.yaml b/third_party/xsimd/moz.yaml index c141499173ee..786f34d41125 100644 --- a/third_party/xsimd/moz.yaml +++ b/third_party/xsimd/moz.yaml @@ -10,8 +10,8 @@ origin: url: https://github.com/QuantStack/xsimd - release: 6d6067a049987803ae07dad62f66f603773324b9 (2025-01-26T21:05:43Z). - revision: 6d6067a049987803ae07dad62f66f603773324b9 + release: c0a7b5d2666c18303d27aa10ae4d50f00056aaad (2025-02-26T11:05:33Z). + revision: c0a7b5d2666c18303d27aa10ae4d50f00056aaad license: BSD-3-Clause