SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::max_score_updater_simd_global Struct Reference

Function object that compares and updates the alignment optimum for the vectorised global alignment algorithm. More...

#include <seqan3/alignment/pairwise/detail/policy_optimum_tracker_simd.hpp>

Public Member Functions

template<typename score_t , typename coordinate_t >
requires (std::assignable_from<score_t &, score_t const &> && requires (coordinate_t coordinate) { requires simd_concept<decltype(coordinate.col)>; requires simd_concept<decltype(coordinate.row)>; })
void operator() (score_t &optimal_score, coordinate_t const &optimal_coordinate, score_t current_score, coordinate_t const &current_coordinate) const noexcept
 Compares and updates the optimal score-coordinate pair.
 

Detailed Description

Function object that compares and updates the alignment optimum for the vectorised global alignment algorithm.

This operation is specific to the global alignment in vectorised mode. The tracking of the last cells of the different alignment matrices that are computed simultaneously in one vector unit depends on how the scoring of the global alignment works. Any alignment matrix that is smaller than the largest matrix defined by the longest sequence in the collection of the first sequences and in the collection of the second sequences, will have its last cell in the middle of the encompassing matrix. In order to track this cell without checking every cell of the alignment matrix for the correct coordinate, the last cell of every contained matrix is projected along its diagonal to either the last row or the last column of the encompassing matrix. Within the algorithm only the cells of the last row, respectively column are tracked. Since the cells to track are fixed, the respective coordinates for every contained matrix can be precomputed. Subsequently, within this update operation the score is only updated if the coordinate of the current cell compares equal to the precomputed coordinate of any of the contained matrices.

Member Function Documentation

◆ operator()()

template<typename score_t , typename coordinate_t >
requires (std::assignable_from<score_t &, score_t const &> && requires (coordinate_t coordinate) { requires simd_concept<decltype(coordinate.col)>; requires simd_concept<decltype(coordinate.row)>; })
void seqan3::detail::max_score_updater_simd_global::operator() ( score_t &  optimal_score,
coordinate_t const &  optimal_coordinate,
score_t  current_score,
coordinate_t const &  current_coordinate 
) const
inlinenoexcept

Compares and updates the optimal score-coordinate pair.

Template Parameters
score_tThe type of the score to track; must model std::assignable_from const & score_t.
coordinate_tThe type of the coordinate to track; must be a seqan3::matrix_index type with members that model seqan3::simd::simd_concept.
Parameters
[in,out]optimal_scoreThe optimal score to update.
[in,out]optimal_coordinateThe optimal coordinate to update.
[in]current_scoreThe score of the current cell.
[in]current_coordinateThe coordinate of the current cell.

Compares the coordinate of the current cell with the precomputed coordinate which represent the projected last cells of the contained matrices. If a coordinate matches the precomputed one, then the respective score will be set for the optimal score.


The documentation for this struct was generated from the following file:
Hide me