0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::simd: Fix 'return type cannot be vectorized' inhibition (clang).

This commit is contained in:
Jason Volk 2023-03-26 14:15:31 -07:00
parent b1c2576c20
commit 38e77c64c6

View file

@ -24,23 +24,24 @@ namespace ircd::simd
/// T = inner aligned type
template<class T>
struct
__attribute__((packed))
__attribute__((aligned(1)))
__attribute__((visibility("internal")))
[[using clang: internal_linkage, nodebug]]
[[using gnu: packed, aligned(1), visibility("internal")]]
ircd::simd::unaligned
{
using value_type = T;
T val;
operator T() const
[[gnu::always_inline]]
operator T() const noexcept
{
return val;
}
template<class U>
unaligned(U&& val)
:val(std::forward<U>(val))
[[gnu::always_inline]]
unaligned(const U val) noexcept
:val(val)
{}
};