SeqAn3 3.1.0
The Modern C++ library for sequence analysis.
default_simd_length.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik
4// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6// -----------------------------------------------------------------------------------------------------
7
13#pragma once
14
16
17namespace seqan3::detail
18{
19
31template <template <typename, size_t> typename simd_backend_t>
32constexpr auto default_simd_max_length = 0u;
33
40template <typename scalar_t, template <typename, size_t> typename simd_backend_t>
41constexpr auto default_simd_length = []
42{
43 constexpr auto max_length = default_simd_max_length<simd_backend_t>;
44 if constexpr (max_length == 0)
45 return min_viable_uint_v<1u>;
46 else
47 return min_viable_uint_v<max_length / sizeof(scalar_t)>;
48}();
49
50} // namespace seqan3::detail
Provides metaprogramming utilities for integer types.