Skip to content

Commit

Permalink
[MISC] Rename hibf namespace to seqan::hibf
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed Aug 24, 2023
1 parent 1e269ec commit b072b55
Show file tree
Hide file tree
Showing 78 changed files with 729 additions and 686 deletions.
2 changes: 1 addition & 1 deletion include/hibf/all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

/*!\defgroup search_dream_index DREAM Index
* \brief Provides hibf::interleaved_bloom_filter.
* \brief Provides seqan::hibf::interleaved_bloom_filter.
* \ingroup search
* \see search
*/
Expand Down
4 changes: 2 additions & 2 deletions include/hibf/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <cereal/access.hpp> // for access
#include <cereal/cereal.hpp> // for make_nvp, CEREAL_NVP

namespace hibf
namespace seqan::hibf
{

using insert_iterator = std::insert_iterator<robin_hood::unordered_flat_set<uint64_t>>;
Expand Down Expand Up @@ -111,4 +111,4 @@ struct config
}
};

} // namespace hibf
} // namespace seqan::hibf
8 changes: 4 additions & 4 deletions include/hibf/contrib/aligned_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# pragma GCC warning "Non-C++17 compliant compiler! Please open an issue with your compiler and platform!"
#endif // __cpp_aligned_new < 201606

namespace hibf::contrib
namespace seqan::hibf::contrib
{

/*!\brief Allocates uninitialized storage whose memory-alignment is specified by *alignment*.
Expand Down Expand Up @@ -151,14 +151,14 @@ class aligned_allocator
}

/*!\brief Deallocates the storage referenced by the pointer p, which must be a pointer obtained by an earlier call
* to hibf::aligned_allocator::allocate.
* to seqan::hibf::aligned_allocator::allocate.
*
* \param[in] p The pointer to the memory to be deallocated.
* \param[in] n The number of elements to be deallocated.
*
* \details
*
* The argument `n` must be equal to the first argument of the call to hibf::aligned_allocator::allocate that
* The argument `n` must be equal to the first argument of the call to seqan::hibf::aligned_allocator::allocate that
* originally produced `p`, otherwise the behavior is undefined. This function calls
* [operator delete](https://en.cppreference.com/w/cpp/memory/new/operator_delete) to deallocate the memory of
* specified size.
Expand Down Expand Up @@ -237,4 +237,4 @@ class aligned_allocator
//!\}
};

} // namespace hibf::contrib
} // namespace seqan::hibf::contrib
6 changes: 3 additions & 3 deletions include/hibf/detail/build/bin_size_in_bits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// --------------------------------------------------------------------------------------------------

/*!\file
* \brief Implements hibf::bin_size_in_bits.
* \brief Implements seqan::hibf::bin_size_in_bits.
* \author Enrico Seiler <enrico.seiler AT fu-berlin.de>
*/

Expand All @@ -17,7 +17,7 @@

#include <hibf/platform.hpp>

namespace hibf
namespace seqan::hibf
{

struct bin_size_parameters
Expand All @@ -35,4 +35,4 @@ inline size_t bin_size_in_bits(bin_size_parameters const & params)
return result;
}

} // namespace hibf
} // namespace seqan::hibf
6 changes: 3 additions & 3 deletions include/hibf/detail/build/build_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
#include <hibf/detail/build/node_data.hpp> // for node_data
#include <hibf/detail/timer.hpp> // for concurrent, timer

namespace hibf
namespace seqan::hibf
{

struct build_data
{
std::atomic<size_t> ibf_number{};

hibf::config const & config;
seqan::hibf::config const & config;

lemon::ListDigraph ibf_graph{};
lemon::ListDigraph::NodeMap<node_data> node_map{ibf_graph};
Expand All @@ -46,4 +46,4 @@ struct build_data
}
};

} // namespace hibf
} // namespace seqan::hibf
4 changes: 2 additions & 2 deletions include/hibf/detail/build/chopper_pack_record.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <hibf/platform.hpp>

namespace hibf
namespace seqan::hibf
{

struct chopper_pack_record
Expand Down Expand Up @@ -45,4 +45,4 @@ struct chopper_pack_record
}
};

} // namespace hibf
} // namespace seqan::hibf
6 changes: 3 additions & 3 deletions include/hibf/detail/build/compute_kmers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// --------------------------------------------------------------------------------------------------

/*!\file
* \brief Implements hibf::compute_kmers.
* \brief Implements seqan::hibf::compute_kmers.
* \author Enrico Seiler <enrico.seiler AT fu-berlin.de>
*/

Expand All @@ -18,11 +18,11 @@
#include <hibf/detail/build/build_data.hpp> // for build_data
#include <hibf/detail/layout/layout.hpp> // for layout

namespace hibf
namespace seqan::hibf
{

void compute_kmers(robin_hood::unordered_flat_set<uint64_t> & kmers,
build_data const & data,
layout::layout::user_bin const & record);

} // namespace hibf
} // namespace seqan::hibf
16 changes: 8 additions & 8 deletions include/hibf/detail/build/construct_ibf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
#include <hibf/detail/build/build_data.hpp> // for build_data
#include <hibf/interleaved_bloom_filter.hpp> // for interleaved_bloom_filter

namespace hibf
namespace seqan::hibf
{

hibf::interleaved_bloom_filter construct_ibf(robin_hood::unordered_flat_set<uint64_t> & parent_kmers,
robin_hood::unordered_flat_set<uint64_t> & kmers,
size_t const number_of_bins,
lemon::ListDigraph::Node const & node,
build_data & data,
bool is_root);
seqan::hibf::interleaved_bloom_filter construct_ibf(robin_hood::unordered_flat_set<uint64_t> & parent_kmers,
robin_hood::unordered_flat_set<uint64_t> & kmers,
size_t const number_of_bins,
lemon::ListDigraph::Node const & node,
build_data & data,
bool is_root);

} // namespace hibf
} // namespace seqan::hibf
6 changes: 3 additions & 3 deletions include/hibf/detail/build/initialise_build_tree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// --------------------------------------------------------------------------------------------------

/*!\file
* \brief Implements hibf::initialise_build_tree.
* \brief Implements seqan::hibf::initialise_build_tree.
* \author Svenja Mehringer <svenja.mehringer AT fu-berlin.de>
*/

Expand All @@ -17,11 +17,11 @@
#include <hibf/detail/build/node_data.hpp> // for node_data
#include <hibf/detail/layout/layout.hpp> // for layout

namespace hibf
namespace seqan::hibf
{

void initialise_build_tree(layout::layout & hibf_layout,
lemon::ListDigraph & ibf_graph,
lemon::ListDigraph::NodeMap<node_data> & node_map);

} // namespace hibf
} // namespace seqan::hibf
8 changes: 4 additions & 4 deletions include/hibf/detail/build/insert_into_ibf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
#include <hibf/detail/timer.hpp> // for concurrent, timer
#include <hibf/interleaved_bloom_filter.hpp> // for interleaved_bloom_filter

namespace hibf
namespace seqan::hibf
{

// automatically does naive splitting if number_of_bins > 1
void insert_into_ibf(robin_hood::unordered_flat_set<uint64_t> const & kmers,
size_t const number_of_bins,
size_t const bin_index,
hibf::interleaved_bloom_filter & ibf,
seqan::hibf::interleaved_bloom_filter & ibf,
timer<concurrent::yes> & fill_ibf_timer);

void insert_into_ibf(build_data const & data,
layout::layout::user_bin const & record,
hibf::interleaved_bloom_filter & ibf);
seqan::hibf::interleaved_bloom_filter & ibf);

} // namespace hibf
} // namespace seqan::hibf
4 changes: 2 additions & 2 deletions include/hibf/detail/build/node_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <hibf/detail/layout/layout.hpp> // for operator==, layout

namespace hibf
namespace seqan::hibf
{

struct node_data // rename:ibf_data? or ibf_node_data
Expand Down Expand Up @@ -47,4 +47,4 @@ struct node_data // rename:ibf_data? or ibf_node_data
}
};

} // namespace hibf
} // namespace seqan::hibf
6 changes: 3 additions & 3 deletions include/hibf/detail/build/update_content_node_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// --------------------------------------------------------------------------------------------------

/*!\file
* \brief Implements hibf::update_content_node_data.
* \brief Implements seqan::hibf::update_content_node_data.
* \author Svenja Mehringer <svenja.mehringer AT fu-berlin.de>
*/

Expand All @@ -19,11 +19,11 @@
#include <hibf/detail/build/node_data.hpp> // for node_data
#include <hibf/detail/layout/layout.hpp> // for layout

namespace hibf
namespace seqan::hibf
{

void update_content_node_data(std::vector<layout::layout::user_bin> && layout_user_bins,
lemon::ListDigraph & ibf_graph,
lemon::ListDigraph::NodeMap<node_data> & node_map);

} // namespace hibf
} // namespace seqan::hibf
6 changes: 3 additions & 3 deletions include/hibf/detail/build/update_header_node_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// --------------------------------------------------------------------------------------------------

/*!\file
* \brief Implements hibf::update_header_node_data.
* \brief Implements seqan::hibf::update_header_node_data.
* \author Svenja Mehringer <svenja.mehringer AT fu-berlin.de>
*/

Expand All @@ -19,11 +19,11 @@
#include <hibf/detail/build/node_data.hpp> // for node_data
#include <hibf/detail/layout/layout.hpp> // for layout

namespace hibf
namespace seqan::hibf
{

void update_header_node_data(std::vector<layout::layout::max_bin> && header_max_bins,
lemon::ListDigraph & ibf_graph,
lemon::ListDigraph::NodeMap<node_data> & node_map);

} // namespace hibf
} // namespace seqan::hibf
6 changes: 3 additions & 3 deletions include/hibf/detail/build/update_parent_kmers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// --------------------------------------------------------------------------------------------------

/*!\file
* \brief Implements hibf::update_parent_kmers.
* \brief Implements seqan::hibf::update_parent_kmers.
* \author Svenja Mehringer <svenja.mehringer AT fu-berlin.de>
*/
#pragma once
Expand All @@ -17,7 +17,7 @@
#include <hibf/detail/timer.hpp> // for concurrent, timer
#include <hibf/platform.hpp>

namespace hibf
namespace seqan::hibf
{

inline void update_parent_kmers(robin_hood::unordered_flat_set<uint64_t> & parent_kmers,
Expand All @@ -31,4 +31,4 @@ inline void update_parent_kmers(robin_hood::unordered_flat_set<uint64_t> & paren
merge_kmers_timer += local_merge_kmers_timer;
}

} // namespace hibf
} // namespace seqan::hibf
4 changes: 2 additions & 2 deletions include/hibf/detail/build/update_user_bins.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

#include <hibf/detail/layout/layout.hpp> // for layout

namespace hibf
namespace seqan::hibf
{

inline void update_user_bins(std::vector<int64_t> & filename_indices, layout::layout::user_bin const & record)
{
std::fill_n(filename_indices.begin() + record.storage_TB_id, record.number_of_technical_bins, record.idx);
}

} // namespace hibf
} // namespace seqan::hibf
4 changes: 2 additions & 2 deletions include/hibf/detail/cereal/concepts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <cereal/details/helpers.hpp> // for InputArchiveBase, OutputArchiveBase

namespace hibf
namespace seqan::hibf
{

template <typename t>
Expand All @@ -23,4 +23,4 @@ concept cereal_input_archive = std::is_base_of_v<cereal::detail::InputArchiveBas
template <typename t>
concept cereal_archive = cereal_output_archive<t> || cereal_input_archive<t>;

} // namespace hibf
} // namespace seqan::hibf
4 changes: 2 additions & 2 deletions include/hibf/detail/data_store.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <hibf/detail/layout/layout.hpp> // for layout
#include <hibf/detail/sketch/hyperloglog.hpp> // for hyperloglog

namespace hibf
namespace seqan::hibf
{

struct data_store
Expand Down Expand Up @@ -79,4 +79,4 @@ struct data_store
//!\}
};

} // namespace hibf
} // namespace seqan::hibf
4 changes: 2 additions & 2 deletions include/hibf/detail/layout/compute_fpr_correction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <hibf/platform.hpp>

namespace hibf::layout
namespace seqan::hibf::layout
{

struct fpr_correction_parameters
Expand All @@ -20,4 +20,4 @@ struct fpr_correction_parameters
*/
std::vector<double> compute_fpr_correction(fpr_correction_parameters const & params);

} // namespace hibf::layout
} // namespace seqan::hibf::layout
4 changes: 2 additions & 2 deletions include/hibf/detail/layout/compute_layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <hibf/detail/layout/layout.hpp> // for layout
#include <hibf/detail/sketch/hyperloglog.hpp> // for hyperloglog

namespace hibf::layout
namespace seqan::hibf::layout
{

/*!\brief Computes the layout and stores the kmer_counts and sketches in the respective vectors for further use.
Expand All @@ -21,4 +21,4 @@ compute_layout(config const & config, std::vector<size_t> & kmer_counts, std::ve

layout compute_layout(config const & config);

} // namespace hibf::layout
} // namespace seqan::hibf::layout
4 changes: 2 additions & 2 deletions include/hibf/detail/layout/execute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include <hibf/config.hpp> // for config
#include <hibf/detail/data_store.hpp> // for data_store

namespace hibf
namespace seqan::hibf
{

size_t execute(config const &, data_store &);

} // namespace hibf
} // namespace seqan::hibf
Loading

0 comments on commit b072b55

Please sign in to comment.