Skip to content

Commit

Permalink
Merge pull request #153 from seqan/actions/iwyu
Browse files Browse the repository at this point in the history
[MISC] IWYU
  • Loading branch information
eseiler authored Oct 31, 2023
2 parents 92720b7 + 041d7b3 commit bbdcb7b
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 42 deletions.
11 changes: 6 additions & 5 deletions include/hibf/interleaved_bloom_filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@
#include <cstring> // for size_t
#include <functional> // for plus
#include <ranges> // for range, forward_range, input_range, range_reference_t, range_value_t
#include <tuple> // for tie, operator==, tuple
#include <type_traits> // for remove_cvref_t
#include <utility> // for addressof
#include <vector> // for vector

#include <hibf/cereal/concepts.hpp> // for cereal_archive
#include <hibf/config.hpp> // for config
#include <hibf/misc/bit_vector.hpp>
#include <hibf/cereal/concepts.hpp> // for cereal_archive
#include <hibf/config.hpp> // for config
#include <hibf/contrib/aligned_allocator.hpp> // for aligned_allocator
#include <hibf/misc/bit_vector.hpp> // for bit_vector

#include <cereal/macros.hpp> // for CEREAL_SERIALIZE_FUNCTION_NAME
#include <cereal/macros.hpp> // for CEREAL_SERIALIZE_FUNCTION_NAME
#include <cereal/types/base_class.hpp> // for base_class

namespace seqan::hibf
{
Expand Down
34 changes: 25 additions & 9 deletions include/hibf/misc/bit_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,31 @@

#pragma once

#include <algorithm>
#include <cassert>
#include <climits>
#include <vector>

#include <hibf/cereal/concepts.hpp>
#include <hibf/contrib/aligned_allocator.hpp>

#include <cereal/types/base_class.hpp>
#include <algorithm> // for max, __for_each_fn, for_each, __all_of_fn, __any_of_fn, __fill_fn
#include <bit> // for countr_zero
#include <cassert> // for assert
#include <cinttypes> // for uint64_t
#include <climits> // for CHAR_BIT
#include <compare> // for strong_ordering, operator==
#include <concepts> // for assignable_from
#include <cstddef> // for size_t, ptrdiff_t
#include <functional> // for identity
#include <initializer_list> // for initializer_list
#include <iterator> // for back_inserter, iter_reference_t, random_access_iterator_tag
#include <memory> // for assume_aligned, allocator_traits
#include <ranges> // for __next_fn, distance, next, _Begin, _End, __distance_fn, begin
#include <stdexcept> // for out_of_range
#include <string> // for operator+, char_traits, to_string, operator""s
#include <type_traits> // for conditional_t
#include <utility> // for swap
#include <vector> // for allocator, vector

#include <hibf/cereal/concepts.hpp> // for cereal_archive
#include <hibf/contrib/aligned_allocator.hpp> // for aligned_allocator
#include <hibf/platform.hpp> // for HIBF_CONSTEXPR_VECTOR

#include <cereal/macros.hpp> // for CEREAL_SERIALIZE_FUNCTION_NAME
#include <cereal/types/base_class.hpp> // for base_class

namespace seqan::hibf
{
Expand Down
3 changes: 2 additions & 1 deletion include/hibf/misc/print.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include <iostream> // for cout, ostream
#include <vector> // for vector

#include <hibf/interleaved_bloom_filter.hpp> // for counting_vector, bit_vector
#include <hibf/interleaved_bloom_filter.hpp> // for counting_vector
#include <hibf/misc/bit_vector.hpp> // for bit_vector

namespace seqan::hibf
{
Expand Down
1 change: 1 addition & 0 deletions src/interleaved_bloom_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <hibf/config.hpp> // for config, insert_iterator
#include <hibf/contrib/robin_hood.hpp> // for unordered_flat_set
#include <hibf/interleaved_bloom_filter.hpp> // for interleaved_bloom_filter, bin_count, bin_index, bin_size, hash_...
#include <hibf/misc/bit_vector.hpp> // for bit_vector
#include <hibf/misc/divide_and_ceil.hpp> // for divide_and_ceil
#include <hibf/platform.hpp> // for HIBF_COMPILER_IS_GCC

Expand Down
3 changes: 2 additions & 1 deletion src/misc/print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include <ranges> // for range_value_t, empty
#include <vector> // for vector

#include <hibf/interleaved_bloom_filter.hpp> // for counting_vector, bit_vector
#include <hibf/interleaved_bloom_filter.hpp> // for counting_vector
#include <hibf/misc/bit_vector.hpp> // for bit_vector
#include <hibf/misc/print.hpp> // for print_t

namespace seqan::hibf
Expand Down
14 changes: 9 additions & 5 deletions test/include/hibf/test/iterator_test_template.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@

#pragma once

#include <gtest/gtest.h>

#include <iterator>
#include <memory>
#include <ranges>
#include <gtest/gtest.h> // for AssertionResult, Message, TestPartResult, EXPECT_TRUE, EXPECT_EQ, EXPECT_FALSE, Typ...

#include <concepts> // for derived_from, same_as, copy_constructible, equality_comparable_with
#include <cstddef> // for size_t
#include <iterator> // for random_access_iterator_tag, forward_iterator_tag, bidirectional_iterator_tag, input...
#include <memory> // for to_address
#include <ranges> // for begin, cbegin, next, end, cend, distance, iterator_t, range_difference_t
#include <type_traits> // for remove_reference_t, conditional_t
#include <utility> // for as_const, addressof, pair

#include <hibf/platform.hpp>

Expand Down
12 changes: 9 additions & 3 deletions test/performance/ibf/bit_vector_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@

// Authored by: Rene Rahn <rene.rahn AT fu-berlin.de>

#include <benchmark/benchmark.h>
#include <benchmark/benchmark.h> // for Benchmark, State, BENCHMARK_CAPTURE, DoNotOptimize, BENCHMARK_MAIN

#include <random>
#include <algorithm> // for __generate_fn, generate
#include <cinttypes> // for int32_t, uint8_t
#include <cstddef> // for size_t
#include <memory> // for allocator
#include <random> // for uniform_int_distribution, mt19937_64
#include <type_traits> // for invoke_result_t
#include <utility> // for move, pair

#include <hibf/misc/bit_vector.hpp>
#include <hibf/misc/bit_vector.hpp> // for bit_vector

seqan::hibf::bit_vector generate_bit_vector(size_t const size, size_t const seed)
{
Expand Down
21 changes: 14 additions & 7 deletions test/unit/hibf/bit_vector_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@

// Authored by: Rene Rahn <rene.rahn AT fu-berlin.de>

#include <gtest/gtest.h>

#include <concepts>
#include <type_traits>

#include <hibf/misc/bit_vector.hpp>
#include <hibf/test/iterator_test_template.hpp>
#include <gtest/gtest.h> // for AssertionResult, Message, TestPartResult, Test, EXPECT_TRUE

#include <algorithm> // for for_each
#include <concepts> // for convertible_to, same_as, integral
#include <cstddef> // for size_t
#include <initializer_list> // for initializer_list
#include <iterator> // for output_iterator, random_access_iterator_tag
#include <ranges> // for _CBegin, _CEnd, cbegin, cend
#include <stdexcept> // for out_of_range
#include <utility> // for as_const, move
#include <vector> // for allocator, vector

#include <hibf/misc/bit_vector.hpp> // for bit_vector, operator&, operator^, operator|
#include <hibf/test/iterator_test_template.hpp> // for iterator_fixture, gtest_registered_test_names_iterator_fixture_

// ----------------------------------------------------------------------------
// associated types
Expand Down
23 changes: 13 additions & 10 deletions test/unit/hibf/interleaved_bloom_filter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
// SPDX-FileCopyrightText: 2016-2023, Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause

#include <gtest/gtest.h> // for Message, TestPartResult, AssertionResult, EXPECT_EQ, TEST

#include <algorithm> // for for_each
#include <array> // for array
#include <cstddef> // for size_t
#include <functional> // for function
#include <ranges> // for iota_view, operator==, _Iota, iota
#include <stdexcept> // for logic_error, invalid_argument
#include <vector> // for vector, allocator
#include <gtest/gtest.h> // for Test, Message, TestPartResult, AssertionResult, EXPECT_EQ, Test...

#include <algorithm> // for __for_each_fn, for_each
#include <array> // for array
#include <compare> // for operator<, strong_ordering
#include <cstddef> // for size_t
#include <functional> // for identity, function
#include <ranges> // for iota_view, operator==, _Iota, iota, views
#include <stdexcept> // for logic_error, invalid_argument
#include <type_traits> // for is_copy_assignable_v, is_copy_constructible_v, is_default_const...
#include <vector> // for vector, allocator

#include <hibf/config.hpp> // for insert_iterator, config
#include <hibf/interleaved_bloom_filter.hpp> // for bin_index, interleaved_bloom_filter, bin_count, bin_size, hash_...
#include <hibf/interleaved_bloom_filter.hpp> // for interleaved_bloom_filter, bin_index, bin_count, bin_size, hash_...
#include <hibf/misc/bit_vector.hpp> // for bit_vector
#include <hibf/test/expect_range_eq.hpp> // for expect_range_eq, EXPECT_RANGE_EQ

TEST(ibf_test, construction)
Expand Down
3 changes: 2 additions & 1 deletion test/unit/hibf/print_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#include <ranges> // for range_value_t
#include <vector> // for allocator, vector

#include <hibf/interleaved_bloom_filter.hpp> // for counting_vector, bit_vector
#include <hibf/interleaved_bloom_filter.hpp> // for counting_vector
#include <hibf/misc/bit_vector.hpp> // for bit_vector
#include <hibf/misc/print.hpp> // for print

template <typename t>
Expand Down

1 comment on commit bbdcb7b

@vercel
Copy link

@vercel vercel bot commented on bbdcb7b Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hibf – ./

hibf.vercel.app
hibf-git-main-seqan.vercel.app
hibf-seqan.vercel.app

Please sign in to comment.