File indexing completed on 2025-08-28 09:11:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
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
0027
0028
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