<commit_before>#ifndef XSIMD_NEON64_HPP
#define XSIMD_NEON64_HPP

#include "../types/xsimd_neon64_register.hpp"
#include "../types/xsimd_utils.hpp"

namespace xsimd
{
    namespace kernel
    {
        using namespace types;

        /*************<commit_msg>Faster implementation of xsimd::all and xsimd::any on aarch64<commit_after>#ifndef XSIMD_NEON64_HPP
#define XSIMD_NEON64_HPP

#include "../types/xsimd_neon64_register.hpp"
#include "../types/xsimd_utils.hpp"

namespace xsimd
{
    namespace kernel
    {
        using namespace types;
        /*******
         * all *
         *******/

        template <class A, class T, detail::enable_sized_t<T, 1> = 0>
        bool all(batch_bool<T, A> const& arg, requires_arch<neon64>)
        {
            return vminvq_u8(arg);
        }

        template <class A, class T, detail::enable_sized_t<T, 2> = 0>
        bool all(batch_bool<T, A> const& arg, requires_arch<neon64>)
        {
            return vminvq_u16(arg);
        }

        template <class A, class T, detail::enable_sized_t<T, 4> = 0>
        bool all(batch_bool<T, A> const& arg, requires_arch<neon64>)
        {
            return vminvq_u32(arg);
        }

        template <class A, class T, detail::enable_sized_t<T, 8> = 0>
        bool all(batch_bool<T, A> const& arg, requires_arch<neon64>)
        {
            return all(batch_bool<uint32_t, A>(vreinterpretq_u32_u64(arg)), neon64{});
        }

        /*******
         * any *
         *******/

        template <class A, class T, detail::enable_sized_t<T, 1> = 0>
        bool any(batch_bool<T, A> const& arg, requires_arch<neon64>)
        {
            return vmaxvq_u8(arg);
        }

        template <class A, class T, detail::enable_sized_t<T, 2> = 0>
        bool any(batch_bool<T, A> const& arg, requires_arch<neon64>)
        {
            return vmaxvq_u16(arg);
        }

        template <class A, class T, detail::enable_sized_t<T, 4> = 0>
        bool any(batch_bool<T, A> const& arg, requires_arch<neon64>)
        {
            return vmaxvq_u32(arg);
        }

        template <class A, class T, detail::enable_sized_t<T, 8> = 0>
        bool any(batch_bool<T, A> const& arg, requires_arch<neon64>)
        {
            return any(batch_bool<uint32_t, A>(vreinterpretq_u32_u64(arg)), neon64{});
        }

        /*************
{'fraction_non_alphanumeric': 0.14011106364801368, 'fraction_numerical': 0.030756087142246903, 'mean_word_length': 2.340941512125535, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4607700', 'n_tokens_mistral': 877, 'n_tokens_neox': 816, 'n_words': 171}