Skip to content

Commit

Permalink
[FIX] gcc-15: Better bogus memcpy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Jul 22, 2024
1 parent 8c1a881 commit 396f5cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#pragma once

#include <algorithm>
#include <ranges>
#include <vector>

Expand Down Expand Up @@ -111,10 +112,13 @@ class score_matrix_single_column
score_t const initial_value = score_t{})
{
this->number_of_columns = number_of_columns.get();
optimal_column.clear();
horizontal_column.clear();

std::ranges::fill(optimal_column, initial_value);
optimal_column.resize(number_of_rows.get(), initial_value);

std::ranges::fill(horizontal_column, initial_value);
horizontal_column.resize(number_of_rows.get(), initial_value);

vertical_column = views::repeat_n(initial_value, number_of_rows.get());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,8 @@ class pairwise_alignment_algorithm_banded :
size_t const sequence1_size = std::ranges::distance(simd_seq1_collection);
size_t const sequence2_size = std::ranges::distance(simd_seq2_collection);

#if SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif // SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY
auto && [alignment_matrix, index_matrix] =
this->acquire_matrices(sequence1_size, sequence2_size, this->lowest_viable_score());
#if SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY
# pragma GCC diagnostic pop
#endif // SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY

compute_matrix(simd_seq1_collection, simd_seq2_collection, alignment_matrix, index_matrix);

Expand Down

0 comments on commit 396f5cd

Please sign in to comment.