diff --git a/include/silo/config/util/abstract_config_source.h b/include/silo/config/util/abstract_config_source.h index e13b1b53a..b627eeddb 100644 --- a/include/silo/config/util/abstract_config_source.h +++ b/include/silo/config/util/abstract_config_source.h @@ -1,5 +1,6 @@ #pragma once +#include <cstdint> #include <optional> #include <string> #include <string_view> diff --git a/src/silo/database.cpp b/src/silo/database.cpp index 77938ec4b..3678120b4 100644 --- a/src/silo/database.cpp +++ b/src/silo/database.cpp @@ -240,6 +240,8 @@ BitmapSizePerSymbol Database::calculateBitmapSizePerSymbol( return global_bitmap_size_per_symbol; } +namespace { + void addStatisticToBitmapContainerSize( const RoaringStatistics& statistic, BitmapContainerSizeStatistic& size_statistic @@ -259,6 +261,8 @@ void addStatisticToBitmapContainerSize( statistic.n_values_bitset_containers; } +} + template <typename SymbolType> BitmapContainerSize Database::calculateBitmapContainerSizePerGenomeSection( const SequenceStore<SymbolType>& seq_store, @@ -474,6 +478,7 @@ void Database::saveDatabaseState(const std::filesystem::path& save_directory) { data_version_.saveToFile(data_version_file); } +namespace { DataVersion loadDataVersion(const std::filesystem::path& filename) { if (!std::filesystem::is_regular_file(filename)) { auto error = fmt::format("Input file {} could not be opened.", filename.string()); @@ -489,6 +494,7 @@ DataVersion loadDataVersion(const std::filesystem::path& filename) { } return data_version.value(); } +} Database Database::loadDatabaseState(const std::filesystem::path& save_directory) { Database database; diff --git a/src/silo/storage/position.test.cpp b/src/silo/storage/position.test.cpp index 97a45de82..3fb620981 100644 --- a/src/silo/storage/position.test.cpp +++ b/src/silo/storage/position.test.cpp @@ -14,6 +14,7 @@ using silo::Nucleotide; using silo::Position; +namespace { void serializeToFile(const std::string& filename, const Position<Nucleotide>& position) { std::ofstream output_file(filename.c_str(), std::ios::binary); ::boost::archive::binary_oarchive output_archive(output_file); @@ -27,6 +28,7 @@ void deserializeFromFile(const std::string& filename, Position<Nucleotide>& posi input_archive >> position; input_file.close(); } +} TEST(Position, flipsMostNumerousCorrectlyFromInitiallyUnoptimized) { Position<Nucleotide> under_test;