/*************************************************************************** * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and * * Martin Renou * * Copyright (c) QuantStack * * Copyright (c) Serge Guelton * * * * Distributed under the terms of the BSD 3-Clause License. * * * * The full license is in the file LICENSE, distributed with this software. *
****************************************************************************/
static constexpr std::size_t alignment() noexcept
{ // all alignments are a power of two return detail::max_of(Archs::alignment()..., static_cast<size_t>(0));
}
};
namespace detail
{
// Filter archlists Archs, picking only supported archs and adding // them to L. template <class L, class... Archs> struct supported_helper;
template <class L> struct supported_helper<L, arch_list<>>
{ using type = L;
};
using all_sve_architectures = arch_list<detail::sve<512>, detail::sve<256>, detail::sve<128>>; using all_rvv_architectures = arch_list<detail::rvv<512>, detail::rvv<256>, detail::rvv<128>>; using all_arm_architectures = typename detail::join<all_sve_architectures, arch_list<i8mm<neon64>, neon64, neon>>::type; using all_riscv_architectures = all_rvv_architectures; using all_wasm_architectures = arch_list<wasm>; using all_architectures = typename detail::join<all_riscv_architectures, all_wasm_architectures, all_arm_architectures, all_x86_architectures>::type;
using supported_architectures = typename detail::supported<all_architectures>::type;
using x86_arch = typename detail::supported<all_x86_architectures>::type::best; using arm_arch = typename detail::supported<all_arm_architectures>::type::best; using riscv_arch = typename detail::supported<all_riscv_architectures>::type::best; using best_arch = typename supported_architectures::best;
#ifdef XSIMD_DEFAULT_ARCH using default_arch = XSIMD_DEFAULT_ARCH; #else using default_arch = best_arch; #endif
namespace detail
{ template <class F, class ArchList> class dispatcher
{
const decltype(available_architectures()) availables_archs;
F functor;
template <class Arch, class... Tys>
XSIMD_INLINE auto walk_archs(arch_list<Arch>, Tys&&... args) noexcept -> decltype(functor(Arch {}, std::forward<Tys>(args)...))
{
assert(Arch::available() && "At least one arch must be supported during dispatch"); return functor(Arch {}, std::forward<Tys>(args)...);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.