49template <
typename alignment_algorithm_t, simd_concept score_t,
typename align_local_t = std::false_type>
70 template <typename configuration_t>
92 template <
typename cell_t>
98 auto & [score_cell, trace_cell] = current_cell;
101 score_t tmp = score_cell.diagonal + score;
103 if constexpr (with_trace)
105 auto mask = tmp < score_cell.up;
106 tmp = (
mask) ? score_cell.up : tmp;
109 mask = tmp < score_cell.r_left;
110 tmp = (
mask) ? score_cell.r_left : tmp;
111 trace_cell.current = (
mask) ? trace_cell.r_left : trace_cell.current | trace_cell.r_left;
115 tmp = (tmp < score_cell.up) ? score_cell.up : tmp;
116 tmp = (tmp < score_cell.r_left) ? score_cell.r_left : tmp;
119 if constexpr (align_local_t::value)
121 tmp = (tmp < simd::fill<score_t>(0))
129 score_cell.current = tmp;
134 tmp += state.gap_open_score;
135 score_cell.up += state.gap_extension_score;
136 score_cell.w_left = score_cell.r_left + state.gap_extension_score;
138 auto mask = score_cell.up < tmp;
139 score_cell.up = (
mask) ? tmp : score_cell.up;
141 mask = score_cell.w_left < tmp;
142 score_cell.w_left = (
mask) ? tmp : score_cell.w_left;
159 template <
typename alignment_configuration_t>
168 simd::fill<score_t>(
static_cast<scalar_t
>(scheme.extension_score + scheme.open_score));
178 return simd::fill<score_t>(
static_cast<scalar_t
>(direction));
Provides algorithms to modify seqan3::simd::simd_type.
Provides seqan3::align_config::gap_cost_affine.
Provides seqan3::detail::alignment_algorithm_state.
Provides seqan3::detail::alignment_optimum.
A configuration element for the affine gap cost scheme.
Definition align_config_gap_cost_affine.hpp:72
The CRTP-policy that computes a batch of cells in the alignment matrix using simd instructions.
Definition simd_affine_gap_policy.hpp:51
constexpr simd_affine_gap_policy() noexcept=default
Defaulted.
constexpr score_t convert_to_simd(trace_directions const direction) const noexcept
Converts a trace direction into a simd vector.
Definition simd_affine_gap_policy.hpp:174
friend alignment_algorithm_t
Befriends the derived class to grant it access to the private members.
Definition simd_affine_gap_policy.hpp:54
constexpr void compute_cell(cell_t &¤t_cell, alignment_algorithm_state< score_t > &state, score_t const score) const noexcept
Computes the score of the current simd cell.
Definition simd_affine_gap_policy.hpp:94
alignment_state_t alignment_state
The internal alignment state tracking the current alignment optimum.
Definition simd_affine_gap_policy.hpp:181
constexpr void initialise_alignment_state(alignment_configuration_t const &config) noexcept
Initialise the alignment state for affine gap computation.
Definition simd_affine_gap_policy.hpp:160
Implementation of a masked alphabet to be used for tuple composites.
Definition mask.hpp:35
Provides seqan3::configuration and utility functions.
trace_directions
The possible directions a trace can have. The values can be combined by the logical |-operator.
Definition trace_directions.hpp:26
@ up
Trace comes from the above entry.
@ left
Trace comes from the left entry.
@ diagonal
Trace comes from the diagonal entry.
@ left_open
Trace comes from the left entry, while opening the gap.
@ up_open
Trace comes from the above entry, while opening the gap.
constexpr bool decays_to_ignore_v
Return whether the input type with const, volatile and references removed is std::ignore's type....
Definition basic.hpp:135
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Provides seqan3::simd::simd_traits.
A strong type of underlying type int32_t that represents the score (usually negative) of any characte...
Definition align_config_gap_cost_affine.hpp:48
A strong type of underlying type int32_t that represents a score (usually negative) that is incurred ...
Definition align_config_gap_cost_affine.hpp:31
score_type gap_extension_score
The cached gap extension score.
Definition alignment_algorithm_state.hpp:34
score_type gap_open_score
The cached gap open score.
Definition alignment_algorithm_state.hpp:36
seqan3::simd::simd_traits is the trait class that provides uniform interface to the properties of sim...
Definition simd_traits.hpp:38
Provides the declaration of seqan3::detail::trace_directions.
Provides concepts that do not have equivalents in C++20.
Provides seqan3::simd::simd_concept.