18#include <seqan3/utility/simd/algorithm.hpp>
19#include <seqan3/utility/simd/concept.hpp>
20#include <seqan3/utility/simd/simd_traits.hpp>
22namespace seqan3::detail
38template <
typename score_t>
39struct alignment_optimum
40#if SEQAN3_DOXYGEN_ONLY(1) 0
43 using index_t = IMPLEMENTATION_DEFINED;
46 index_t column_index{};
50 score_t score = IMPLEMENTATION_DEFINED;
68 template <
typename column_index_t,
typename row_index_t>
69 void update_if_new_optimal_score(score_t
const & compare_score,
70 column_index_type<column_index_t> column_index,
71 row_index_type<row_index_t> row_index)
noexcept;
77template <arithmetic score_t>
78struct alignment_optimum<score_t>
80 size_t column_index{};
84 template <std::
integral column_index_t, std::
integral row_index_t>
85 constexpr void update_if_new_optimal_score(score_t
const & compare_score,
86 column_index_type<column_index_t> column_index,
87 row_index_type<row_index_t> row_index)
noexcept
89 score = (compare_score > score)
90 ? (this->column_index = column_index.get(), this->row_index = row_index.get(), compare_score)
95template <simd_concept score_t>
96struct alignment_optimum<score_t>
98 using scalar_t =
typename simd_traits<score_t>::scalar_type;
100 score_t column_index{};
104 template <std::
integral column_index_t, std::
integral row_index_t>
105 constexpr void update_if_new_optimal_score(score_t
const & compare_score,
106 column_index_type<column_index_t> column_index,
107 row_index_type<row_index_t> row_index)
noexcept
109 auto mask = compare_score > score;
110 score = mask ? compare_score : score;
111 this->column_index = mask ? simd::fill<score_t>(column_index.get()) : this->column_index;
112 this->row_index = mask ? simd::fill<score_t>(row_index.get()) : this->row_index;
122alignment_optimum() -> alignment_optimum<int32_t>;
125template <
typename column_index_t,
typename row_index_t,
typename score_t>
126alignment_optimum(column_index_t, row_index_t, score_t) -> alignment_optimum<score_t>;
Provides seqan3::detail::matrix_index, seqan3::detail::matrix_coordinate and associated strong types.
Provides type traits for working with templates.
Provides concepts that do not have equivalents in C++20.