SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
default_simd_length.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
13
14namespace seqan3::detail
15{
16
28template <template <typename, size_t> typename simd_backend_t>
29constexpr auto default_simd_max_length = 0u;
30
37template <typename scalar_t, template <typename, size_t> typename simd_backend_t>
38constexpr auto default_simd_length = []
39{
40 constexpr auto max_length = default_simd_max_length<simd_backend_t>;
41 if constexpr (max_length == 0)
42 return min_viable_uint_v<1u>;
43 else
44 return min_viable_uint_v<max_length / sizeof(scalar_t)>;
45}();
46
47} // namespace seqan3::detail
constexpr auto default_simd_length
seqan3::detail::default_simd_length returns the default length depending on the given scalar_t type,...
Definition default_simd_length.hpp:38
constexpr auto default_simd_max_length
seqan3 auto-detects the maximum number of packable [u]int8_t types.
Definition default_simd_length.hpp:29
constexpr auto min_viable_uint_v
Given a value, cast the value as the smallest unsigned integer that can hold it.
Definition integer_traits.hpp:40
Provides metaprogramming utilities for integer types.
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Hide me