diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/experimental/__simd/aligned_tag.h')
-rw-r--r-- | contrib/llvm-project/libcxx/include/experimental/__simd/aligned_tag.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/llvm-project/libcxx/include/experimental/__simd/aligned_tag.h b/contrib/llvm-project/libcxx/include/experimental/__simd/aligned_tag.h index d216a21c073f..edbb3b24931f 100644 --- a/contrib/llvm-project/libcxx/include/experimental/__simd/aligned_tag.h +++ b/contrib/llvm-project/libcxx/include/experimental/__simd/aligned_tag.h @@ -10,10 +10,10 @@ #ifndef _LIBCPP_EXPERIMENTAL___SIMD_ALIGNED_TAG_H #define _LIBCPP_EXPERIMENTAL___SIMD_ALIGNED_TAG_H -#include <__bit/bit_ceil.h> #include <__memory/assume_aligned.h> #include <cstddef> #include <experimental/__config> +#include <experimental/__simd/traits.h> #if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_ENABLE_EXPERIMENTAL) @@ -30,9 +30,12 @@ struct element_aligned_tag { } }; +template <> +inline constexpr bool is_simd_flag_type_v<element_aligned_tag> = true; + struct vector_aligned_tag { template <class _Tp, class _Up = typename _Tp::value_type> - static constexpr size_t __alignment = std::__bit_ceil(sizeof(_Up) * _Tp::size()); + static constexpr size_t __alignment = memory_alignment_v<_Tp, _Up>; template <class _Tp, class _Up> static _LIBCPP_HIDE_FROM_ABI constexpr _Up* __apply(_Up* __ptr) { @@ -40,6 +43,9 @@ struct vector_aligned_tag { } }; +template <> +inline constexpr bool is_simd_flag_type_v<vector_aligned_tag> = true; + template <size_t _Np> struct overaligned_tag { template <class _Tp, class _Up = typename _Tp::value_type> @@ -51,6 +57,9 @@ struct overaligned_tag { } }; +template <size_t _Np> +inline constexpr bool is_simd_flag_type_v<overaligned_tag<_Np>> = true; + inline constexpr element_aligned_tag element_aligned{}; inline constexpr vector_aligned_tag vector_aligned{}; |