Skip to content

Commit

Permalink
[FIX] Intel 2025.0 variadic templates
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Oct 27, 2024
1 parent 5f5ccc5 commit 27a1695
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
18 changes: 9 additions & 9 deletions test/performance/range/container_push_back_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ template <typename t>
using sdsl_int_vec = sdsl::int_vector<sizeof(t) * 8>;

template <typename t>
using small_vec = seqan3::small_vector<t, 10'000>;
using small_vec = seqan3::small_vector<t, 10000>;

// ============================================================================
// push_back
// ============================================================================

template <template <typename, typename...> typename container_t, typename alphabet_t, typename... args>
template <template <typename...> typename container_t, typename alphabet_t, typename... args>
void push_back(benchmark::State & state)
{
alphabet_t letter{};

for (auto _ : state)
{
container_t<alphabet_t, args...> container;
for (size_t i = 0; i < 10'000; ++i)
for (size_t i = 0; i < 10000; ++i)
container.push_back(letter);
benchmark::DoNotOptimize(letter = container.back());
}
Expand Down Expand Up @@ -119,7 +119,7 @@ void push_back2(benchmark::State & state)
for (auto _ : state)
{
container_t<alphabet_t, spec_t> container;
for (size_t i = 0; i < 10'000; ++i)
for (size_t i = 0; i < 10000; ++i)
seqan2::appendValue(container, letter);
benchmark::DoNotOptimize(letter = seqan2::back(container));
}
Expand Down Expand Up @@ -159,11 +159,11 @@ BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Packed<>, seqan2::Iupac);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Packed<>, seqan2::AminoAcid);
// BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Packed<>, seqan2::Dna5Q); // broken in SeqAn2

BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10'000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10'000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5Q);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10000>, seqan2::Dna);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(push_back2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5Q);

#endif // SEQAN3_HAS_SEQAN2

Expand Down
18 changes: 9 additions & 9 deletions test/performance/range/container_seq_read_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ template <typename t>
using sdsl_int_vec = sdsl::int_vector<sizeof(t) * 8>;

template <typename t>
using small_vec = seqan3::small_vector<t, 10'000>;
using small_vec = seqan3::small_vector<t, 10000>;

// ============================================================================
// sequential_read
// ============================================================================

template <template <typename, typename...> typename container_t,
template <template <typename...> typename container_t,
typename alphabet_t,
bool const_qualified = false,
typename... args>
void sequential_read(benchmark::State & state)
{
container_t<alphabet_t, args...> container = []()
{
auto container = seqan3::test::generate_sequence<alphabet_t>(10'000, 0, 0);
auto container = seqan3::test::generate_sequence<alphabet_t>(10000, 0, 0);
return container_t<alphabet_t, args...>(container.begin(), container.end());
}();

Expand Down Expand Up @@ -178,7 +178,7 @@ template <template <typename...> typename container_t,
bool const_qualified = false>
void sequential_read2(benchmark::State & state)
{
container_t<alphabet_t, spec_t> container{seqan3::test::generate_sequence_seqan2<alphabet_t>(10'000, 0, 0)};
container_t<alphabet_t, spec_t> container{seqan3::test::generate_sequence_seqan2<alphabet_t>(10000, 0, 0)};

using container_reference_t =
std::conditional_t<const_qualified, container_t<alphabet_t, spec_t> const &, container_t<alphabet_t, spec_t> &>;
Expand Down Expand Up @@ -213,11 +213,11 @@ BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Packed<>, seqan2::I
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Packed<>, seqan2::AminoAcid);
// BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Packed<>, seqan2::Dna5Q); // broken in SeqAn2

BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10'000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10'000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5Q);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10000>, seqan2::Dna);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(sequential_read2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5Q);

// ============================================================================
// sequential_read (const)
Expand Down
18 changes: 9 additions & 9 deletions test/performance/range/container_seq_write_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ template <typename t>
using sdsl_int_vec = sdsl::int_vector<sizeof(t) * 8>;

template <typename t>
using small_vec = seqan3::small_vector<t, 10'000>;
using small_vec = seqan3::small_vector<t, 10000>;

// ============================================================================
// sequential_write
// ============================================================================

template <template <typename, typename...> typename container_t, typename alphabet_t, typename... args>
template <template <typename...> typename container_t, typename alphabet_t, typename... args>
void sequential_write(benchmark::State & state)
{
container_t<alphabet_t, args...> container = []()
{
auto container = seqan3::test::generate_sequence<alphabet_t>(10'000, 0, 0);
auto container = seqan3::test::generate_sequence<alphabet_t>(10000, 0, 0);
return container_t<alphabet_t, args...>(container.begin(), container.end());
}();

Expand Down Expand Up @@ -116,7 +116,7 @@ BENCHMARK_TEMPLATE(sequential_write, small_vec, seqan3::alphabet_variant<char, s
template <template <typename...> typename container_t, typename spec_t, typename alphabet_t>
void sequential_write2(benchmark::State & state)
{
container_t<alphabet_t, spec_t> container{seqan3::test::generate_sequence_seqan2<alphabet_t>(10'000, 0, 0)};
container_t<alphabet_t, spec_t> container{seqan3::test::generate_sequence_seqan2<alphabet_t>(10000, 0, 0)};

alphabet_t letter{};
for (auto _ : state)
Expand Down Expand Up @@ -145,11 +145,11 @@ BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Packed<>, seqan2::
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Packed<>, seqan2::AminoAcid);
// BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Packed<>, seqan2::Dna5Q); // broken in SeqAn2

BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10'000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10'000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10'000>, seqan2::Dna5Q);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10000>, seqan2::Dna);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10000>, seqan2::Iupac);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10000>, seqan2::AminoAcid);
BENCHMARK_TEMPLATE(sequential_write2, seqan2::String, seqan2::Array<10000>, seqan2::Dna5Q);

#endif // SEQAN3_HAS_SEQAN2

Expand Down

0 comments on commit 27a1695

Please sign in to comment.