52template <
typename scalar_t,
size_t length>
57template <
typename scalar_t,
size_t length>
62#if SEQAN3_DOXYGEN_ONLY(1) 0
63 using type = scalar_t __attribute__((vector_size(
sizeof(scalar_t) * length))));
65#elif defined(__clang__)
66 using type = scalar_t __attribute__((ext_vector_type(length)));
68 using type [[gnu::vector_size(
sizeof(scalar_t) * length)]] = scalar_t;
76template <
typename builtin_simd_t>
84template <
typename builtin_simd_t>
88 requires (!std::is_pointer_v<std::decay_t<builtin_simd_t>>) &&
requires (builtin_simd_t simd) {
99 static constexpr auto length =
sizeof(builtin_simd_t) /
sizeof(
scalar_type);
103 static constexpr bool value =
105 && std::is_same_v<builtin_simd_t, transformation_trait_or_t<builtin_simd<scalar_type, length>,
void>>;
116template <
typename builtin_simd_t>
125template <
typename builtin_simd_t>
139#if defined(__AVX512F__)
140 return min_viable_uint_v<64u>;
141#elif defined(__AVX2__)
142 return min_viable_uint_v<32u>;
143#elif defined(__SSE4_1__) && defined(__SSE4_2__)
144 return min_viable_uint_v<16u>;
146 return min_viable_uint_v<0u>;
162template <
typename builtin_simd_t>
165 && ((builtin_simd_traits_helper<builtin_simd_t>::length
166 * sizeof(typename builtin_simd_traits_helper<builtin_simd_t>::scalar_type))
168 && ((builtin_simd_traits_helper<builtin_simd_t>::length
169 * sizeof(typename builtin_simd_traits_helper<builtin_simd_t>::scalar_type))
178template <
typename builtin_simd_t>
194template <
typename builtin_simd_t>
207 static_assert(std::is_integral_v<scalar_type>,
"For now we assume that builtin simd can only be integers");
209 using mask_type =
decltype(std::declval<builtin_simd_t>() == std::declval<builtin_simd_t>());
214 template <
typename new_scalar_type>
216 requires (
sizeof(
scalar_type) ==
sizeof(new_scalar_type))
Provides seqan3::detail::default_simd_length and seqan3::detail::default_simd_max_length.
constexpr bool is_builtin_simd_v
Helper variable to test whether a type is a simd builtin type.
Definition: builtin_simd.hpp:126
constexpr bool is_native_builtin_simd_v
Helper variable to test whether a type is a native simd builtin type.
Definition: builtin_simd.hpp:179
constexpr auto default_simd_max_length< builtin_simd >
This function specializes seqan3::detail::default_simd_max_length for seqan3::detail::builtin_simd.
Definition: builtin_simd.hpp:137
T has_single_bit(T... args)
Provides metaprogramming utilities for integer types.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides seqan3::simd::simd_traits.
A class that holds the type of a simd implementation called [vector extension] (https://gcc....
Definition: builtin_simd.hpp:60
scalar_t __attribute__((vector_size(sizeof(scalar_t) *length)))) type
The type of the builtin simd.
Definition: builtin_simd.hpp:63
Helper struct for seqan3::detail::is_builtin_simd.
Definition: builtin_simd.hpp:78
A class that holds the type of a simd implementation called [vector extension] (https://gcc....
Definition: builtin_simd.hpp:53
This class inherits from std::true_type, iff seqan3::detail::builtin_simd<scalar_t,...
Definition: builtin_simd.hpp:118
This class inherits from std::true_type, iff the builtin simd type is supported by the current archit...
Definition: builtin_simd.hpp:171
typename detail::builtin_simd< uint8_t, max_length >::type swizzle_type
The type used to define how to swizzle a simd vector (is not defined if simd_t does not model seqan3:...
Definition: builtin_simd.hpp:211
decltype(std::declval< builtin_simd_t >()==std::declval< builtin_simd_t >()) mask_type
The type returned by comparison operators (is not defined if simd_t does not model seqan3::simd::simd...
Definition: builtin_simd.hpp:209
typename detail::builtin_simd< new_scalar_type, length >::type rebind
The type used to rebind a simd vector to another scalar_type (is not defined if simd_t does not model...
Definition: builtin_simd.hpp:218
typename detail::builtin_simd_traits_helper< builtin_simd_t >::scalar_type scalar_type
The underlying type of a simd vector (is not defined if simd_t does not model seqan3::simd::simd)
Definition: builtin_simd.hpp:201
seqan3::simd::simd_traits is the trait class that provides uniform interface to the properties of sim...
Definition: simd_traits.hpp:41
static constexpr auto length
The number of packed values in a simd vector (is not defined if simd_t does not model seqan3::simd::s...
Definition: simd_traits.hpp:49
IMPLEMENTATION_DEFINED scalar_type
The underlying type of a simd vector (is not defined if simd_t does not model seqan3::simd::simd)
Definition: simd_traits.hpp:45
static constexpr auto max_length
The maximum number of packable values in a simd vector, if the underlying type would be [u]int8_t (is...
Definition: simd_traits.hpp:54