The CRTP-policy that computes a batch of cells in the alignment matrix using simd instructions. More...
#include <seqan3/alignment/pairwise/policy/simd_affine_gap_policy.hpp>
Private Types | |
using | alignment_state_t = alignment_algorithm_state< score_t > |
The type of state of the alignment algorithm for affine gaps. | |
Private Member Functions | |
template<typename cell_t > | |
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. More... | |
constexpr score_t | convert_to_simd (trace_directions const direction) const noexcept |
Converts a trace direction into a simd vector. More... | |
template<typename alignment_configuration_t > | |
constexpr void | initialise_alignment_state (alignment_configuration_t const &config) noexcept |
Initialise the alignment state for affine gap computation. More... | |
Constructors, destructor and assignment | |
constexpr | simd_affine_gap_policy () noexcept=default |
Defaulted. | |
constexpr | simd_affine_gap_policy (simd_affine_gap_policy const &) noexcept=default |
Defaulted. | |
constexpr | simd_affine_gap_policy (simd_affine_gap_policy &&) noexcept=default |
Defaulted. | |
constexpr simd_affine_gap_policy & | operator= (simd_affine_gap_policy const &) noexcept=default |
Defaulted. | |
constexpr simd_affine_gap_policy & | operator= (simd_affine_gap_policy &&) noexcept=default |
Defaulted. | |
~simd_affine_gap_policy () noexcept=default | |
Defaulted. | |
template<typename configuration_t > | |
simd_affine_gap_policy (configuration_t const &) | |
Initialise the policy. | |
Private Attributes | |
friend | alignment_algorithm_t |
Befriends the derived class to grant it access to the private members. | |
alignment_state_t | alignment_state {} |
The internal alignment state tracking the current alignment optimum. | |
The CRTP-policy that computes a batch of cells in the alignment matrix using simd instructions.
alignment_algorithm_t | The derived type (seqan3::detail::alignment_algorithm) to be augmented with this CRTP-policy. |
score_t | The score type of the dynamic programming matrix; must model seqan3::simd::simd_concept. |
align_local_t | A std::bool_constant to switch between local and global alignment. |
This CRTP-policy implements the recursion for the alignment algorithm with affine gaps using an inter-sequence vectorisation scheme. See Rahn, R, et al. Generic accelerated sequence alignment in SeqAn using vectorization and multi-threading. Bioinformatics 34.20 (2018): 3437-3445.
for more information.
|
inlineconstexprprivatenoexcept |
Computes the score of the current simd cell.
cell_t | The type of the current cell [for detailed information on the type see below]. |
[in,out] | current_cell | The current cell in the dynamic programming matrix. |
[in,out] | state | The state storing hot helper variables. |
[in] | score | The score of comparing the respective letters of the first and the second sequence. |
cell_t
is the result type of dereferencing the zipped iterator over the respective alignment score matrix and the alignment trace matrix used inside of the seqan3::detail::alignment_matrix_policy. The first parameter stored in the zipped tuple is the seqan3::detail::alignment_score_matrix_proxy and the second value is the seqan3::detail::alignment_trace_matrix_proxy.
In order to compute the maximum for two simd vectors, gcc implements the ternary operator such that std::max(a, b)
can be implemented as (a > b) ? a : b
, where (a > b)
returns a mask vector. This implements the compare-and-blend approach for simd vector types.
|
inlineconstexprprivatenoexcept |
Converts a trace direction into a simd vector.
[in] | direction | The trace direction to convert to a simd vector. |
|
inlineconstexprprivatenoexcept |
Initialise the alignment state for affine gap computation.
alignment_configuration_t | The type of alignment configuration. |
[in] | config | The alignment configuration. |
Gets the stored gap scheme from the configuration or uses a default gap scheme if not set and initialises the alignment algorithm state with the respective gap extension and gap open costs. If the gap scheme was not specified by the user the following defaults are used:
-1
for the gap extension score, and-10
for the gap open score.