Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MISC] Remove gcc14 workaround #3245

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/seqan3/alignment/configuration/detail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ enum struct align_config_id : uint8_t
* this table to allow validation checks.
*/
template <>
SEQAN3_WORKAROUND_GCC_114013 std::array<std::array<bool, static_cast<uint8_t>(align_config_id::SIZE)>,
static_cast<uint8_t>(align_config_id::SIZE)>
inline constexpr std::array<std::array<bool, static_cast<uint8_t>(align_config_id::SIZE)>,
static_cast<uint8_t>(align_config_id::SIZE)>
compatibility_table<align_config_id>{{
//band
//| debug
Expand Down
11 changes: 0 additions & 11 deletions include/seqan3/core/platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,6 @@ static_assert(sdsl::sdsl_version_major == 3, "Only version 3 of the SDSL is supp
# endif
#endif

/*!\brief Workaround for variable template specialisations not being emitted.
* \see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114013
*/
#ifndef SEQAN3_WORKAROUND_GCC_114013
# if SEQAN3_COMPILER_IS_GCC && (__GNUC__ == 14)
# define SEQAN3_WORKAROUND_GCC_114013 constexpr
# else
# define SEQAN3_WORKAROUND_GCC_114013 inline constexpr
# endif
#endif

/*!\brief This is needed to support CentOS 7 or RHEL 7; Newer CentOS's include a more modern default-gcc version making
* this macro obsolete.
*
Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/search/configuration/detail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ enum struct search_config_id : uint8_t
* determined by the enum value `SIZE` of seqan3::detail::search_config_id.
*/
template <>
SEQAN3_WORKAROUND_GCC_114013 std::array<std::array<bool, static_cast<uint8_t>(search_config_id::SIZE)>,
static_cast<uint8_t>(search_config_id::SIZE)>
inline constexpr std::array<std::array<bool, static_cast<uint8_t>(search_config_id::SIZE)>,
static_cast<uint8_t>(search_config_id::SIZE)>
compatibility_table<search_config_id> = {{
// max_error_total,
// | max_error_substitution,
Expand Down
37 changes: 17 additions & 20 deletions include/seqan3/search/detail/search_scheme_precomputed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,63 +81,60 @@ using search_scheme_dyn_type = std::vector<search_dyn>;
* seems to be a good greedy approach.
*/
template <uint8_t min_error, uint8_t max_error>
SEQAN3_WORKAROUND_GCC_114013 int optimum_search_scheme{0};
inline constexpr int optimum_search_scheme{0};

//!\cond

template <>
SEQAN3_WORKAROUND_GCC_114013 search_scheme_type<1, 1> optimum_search_scheme<0, 0>{{{{1}, {0}, {0}}}};
inline constexpr search_scheme_type<1, 1> optimum_search_scheme<0, 0>{{{{1}, {0}, {0}}}};

template <>
SEQAN3_WORKAROUND_GCC_114013 search_scheme_type<2, 2> optimum_search_scheme<0, 1>{
inline constexpr search_scheme_type<2, 2> optimum_search_scheme<0, 1>{
{{{1, 2}, {0, 0}, {0, 1}}, {{2, 1}, {0, 1}, {0, 1}}}};

template <>
SEQAN3_WORKAROUND_GCC_114013 search_scheme_type<2, 2> optimum_search_scheme<1, 1>{
inline constexpr search_scheme_type<2, 2> optimum_search_scheme<1, 1>{
{{{1, 2}, {0, 1}, {0, 1}}, {{2, 1}, {0, 1}, {0, 1}}}};

template <>
SEQAN3_WORKAROUND_GCC_114013 search_scheme_type<3, 4> optimum_search_scheme<0, 2>{
{{{1, 2, 3, 4}, {0, 0, 1, 1}, {0, 0, 2, 2}},
{{3, 2, 1, 4}, {0, 0, 0, 0}, {0, 1, 1, 2}},
{{4, 3, 2, 1}, {0, 0, 0, 2}, {0, 1, 2, 2}}}};
inline constexpr search_scheme_type<3, 4> optimum_search_scheme<0, 2>{{{{1, 2, 3, 4}, {0, 0, 1, 1}, {0, 0, 2, 2}},
{{3, 2, 1, 4}, {0, 0, 0, 0}, {0, 1, 1, 2}},
{{4, 3, 2, 1}, {0, 0, 0, 2}, {0, 1, 2, 2}}}};

template <>
SEQAN3_WORKAROUND_GCC_114013 search_scheme_type<3, 4> optimum_search_scheme<1, 2>{
{{{1, 2, 3, 4}, {0, 0, 0, 1}, {0, 0, 2, 2}},
{{3, 2, 1, 4}, {0, 0, 1, 1}, {0, 1, 1, 2}},
{{4, 3, 2, 1}, {0, 0, 0, 2}, {0, 1, 2, 2}}}};
inline constexpr search_scheme_type<3, 4> optimum_search_scheme<1, 2>{{{{1, 2, 3, 4}, {0, 0, 0, 1}, {0, 0, 2, 2}},
{{3, 2, 1, 4}, {0, 0, 1, 1}, {0, 1, 1, 2}},
{{4, 3, 2, 1}, {0, 0, 0, 2}, {0, 1, 2, 2}}}};

template <>
SEQAN3_WORKAROUND_GCC_114013 search_scheme_type<3, 4> optimum_search_scheme<2, 2>{
{{{4, 3, 2, 1}, {0, 0, 1, 2}, {0, 0, 2, 2}},
{{2, 3, 4, 1}, {0, 0, 0, 2}, {0, 1, 1, 2}},
{{1, 2, 3, 4}, {0, 0, 0, 2}, {0, 1, 2, 2}}}};
inline constexpr search_scheme_type<3, 4> optimum_search_scheme<2, 2>{{{{4, 3, 2, 1}, {0, 0, 1, 2}, {0, 0, 2, 2}},
{{2, 3, 4, 1}, {0, 0, 0, 2}, {0, 1, 1, 2}},
{{1, 2, 3, 4}, {0, 0, 0, 2}, {0, 1, 2, 2}}}};

// TODO: benchmark whether the first search is really the fastest one (see \details of optimum_search_scheme)
template <>
SEQAN3_WORKAROUND_GCC_114013 search_scheme_type<4, 5> optimum_search_scheme<0, 3>{
inline constexpr search_scheme_type<4, 5> optimum_search_scheme<0, 3>{
{{{5, 4, 3, 2, 1}, {0, 0, 0, 0, 0}, {0, 0, 3, 3, 3}},
{{3, 4, 5, 2, 1}, {0, 0, 1, 1, 1}, {0, 1, 1, 2, 3}},
{{2, 3, 4, 5, 1}, {0, 0, 0, 2, 2}, {0, 1, 2, 2, 3}},
{{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}}};

template <>
SEQAN3_WORKAROUND_GCC_114013 search_scheme_type<4, 5> optimum_search_scheme<1, 3>{
inline constexpr search_scheme_type<4, 5> optimum_search_scheme<1, 3>{
{{{5, 4, 3, 2, 1}, {0, 0, 0, 0, 1}, {0, 0, 3, 3, 3}},
{{3, 4, 5, 2, 1}, {0, 0, 1, 1, 1}, {0, 1, 1, 2, 3}},
{{2, 3, 4, 5, 1}, {0, 0, 0, 2, 2}, {0, 1, 2, 2, 3}},
{{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}}};

template <>
SEQAN3_WORKAROUND_GCC_114013 search_scheme_type<4, 5> optimum_search_scheme<2, 3>{
inline constexpr search_scheme_type<4, 5> optimum_search_scheme<2, 3>{
{{{5, 4, 3, 2, 1}, {0, 0, 0, 0, 2}, {0, 0, 3, 3, 3}},
{{3, 4, 5, 2, 1}, {0, 0, 1, 1, 2}, {0, 1, 1, 2, 3}},
{{2, 3, 4, 5, 1}, {0, 0, 0, 2, 2}, {0, 1, 2, 2, 3}},
{{1, 2, 3, 4, 5}, {0, 0, 0, 0, 3}, {0, 2, 2, 3, 3}}}};

template <>
SEQAN3_WORKAROUND_GCC_114013 search_scheme_type<4, 5> optimum_search_scheme<3, 3>{
inline constexpr search_scheme_type<4, 5> optimum_search_scheme<3, 3>{
{{{5, 4, 3, 2, 1}, {0, 0, 0, 0, 3}, {0, 0, 3, 3, 3}},
{{3, 4, 5, 2, 1}, {0, 0, 1, 1, 3}, {0, 1, 1, 2, 3}},
{{2, 3, 4, 5, 1}, {0, 0, 0, 2, 3}, {0, 1, 2, 2, 3}},
Expand Down
Loading