Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-28 09:11:40

0001 /***************************************************************************
0002  * Copyright (c) Johan Mabille, Sylvain Corlay, Wolf Vollprecht and         *
0003  * Martin Renou                                                             *
0004  * Copyright (c) QuantStack                                                 *
0005  * Copyright (c) Serge Guelton                                              *
0006  * Copyright (c) Anutosh Bhat                                               *
0007  *                                                                          *
0008  * Distributed under the terms of the BSD 3-Clause License.                 *
0009  *                                                                          *
0010  * The full license is in the file LICENSE, distributed with this software. *
0011  ****************************************************************************/
0012 
0013 #ifndef XSIMD_WASM_REGISTER_HPP
0014 #define XSIMD_WASM_REGISTER_HPP
0015 
0016 #include "xsimd_generic_arch.hpp"
0017 #include "xsimd_register.hpp"
0018 
0019 #if XSIMD_WITH_WASM
0020 #include <wasm_simd128.h>
0021 #endif
0022 
0023 namespace xsimd
0024 {
0025     /**
0026      * @ingroup architectures
0027      *
0028      * WASM instructions
0029      */
0030     struct wasm : generic
0031     {
0032         static constexpr bool supported() noexcept { return XSIMD_WITH_WASM; }
0033         static constexpr bool available() noexcept { return true; }
0034         static constexpr bool requires_alignment() noexcept { return true; }
0035         static constexpr std::size_t alignment() noexcept { return 16; }
0036         static constexpr char const* name() noexcept { return "wasm"; }
0037     };
0038 
0039 #if XSIMD_WITH_WASM
0040     namespace types
0041     {
0042         XSIMD_DECLARE_SIMD_REGISTER(signed char, wasm, v128_t);
0043         XSIMD_DECLARE_SIMD_REGISTER(unsigned char, wasm, v128_t);
0044         XSIMD_DECLARE_SIMD_REGISTER(char, wasm, v128_t);
0045         XSIMD_DECLARE_SIMD_REGISTER(unsigned short, wasm, v128_t);
0046         XSIMD_DECLARE_SIMD_REGISTER(short, wasm, v128_t);
0047         XSIMD_DECLARE_SIMD_REGISTER(unsigned int, wasm, v128_t);
0048         XSIMD_DECLARE_SIMD_REGISTER(int, wasm, v128_t);
0049         XSIMD_DECLARE_SIMD_REGISTER(unsigned long int, wasm, v128_t);
0050         XSIMD_DECLARE_SIMD_REGISTER(long int, wasm, v128_t);
0051         XSIMD_DECLARE_SIMD_REGISTER(unsigned long long int, wasm, v128_t);
0052         XSIMD_DECLARE_SIMD_REGISTER(long long int, wasm, v128_t);
0053         XSIMD_DECLARE_SIMD_REGISTER(float, wasm, v128_t);
0054         XSIMD_DECLARE_SIMD_REGISTER(double, wasm, v128_t);
0055     }
0056 #endif
0057 }
0058 
0059 #endif