diff --git a/metagraph/CMakeLists.txt b/metagraph/CMakeLists.txt index 95fa5b0464..b92c3685eb 100644 --- a/metagraph/CMakeLists.txt +++ b/metagraph/CMakeLists.txt @@ -334,6 +334,8 @@ target_compile_options(zlib -Wno-implicit-fallthrough -Wno-deprecated-non-prototype -Wno-unknown-warning-option + -Wno-unused-parameter + -Wno-maybe-uninitialized ) add_library(progress_bar STATIC diff --git a/metagraph/CMakeListsKMC.txt.in b/metagraph/CMakeListsKMC.txt.in index 89b8aaa60a..880710cea4 100644 --- a/metagraph/CMakeListsKMC.txt.in +++ b/metagraph/CMakeListsKMC.txt.in @@ -2,7 +2,11 @@ cmake_minimum_required(VERSION 2.8.12) project(KMC) -add_compile_options(-Wall -O3 -m64 -pthread -std=c++11) +if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|aarch64|arm64)") + add_compile_options(-Wall -O3 -pthread -std=c++11) +else() + add_compile_options(-Wall -O3 -m64 -pthread -std=c++11) +endif() if(@BUILD_STATIC@) string(APPEND CMAKE_CXX_FLAGS " -static ") diff --git a/metagraph/external-libraries/KMC b/metagraph/external-libraries/KMC index 0aa85a021e..b163688487 160000 --- a/metagraph/external-libraries/KMC +++ b/metagraph/external-libraries/KMC @@ -1 +1 @@ -Subproject commit 0aa85a021efeace2f9b0776ebc1b8109ccc9b572 +Subproject commit b163688487c85bdcfeaec70d6f5892868a832040 diff --git a/metagraph/external-libraries/sdsl-lite b/metagraph/external-libraries/sdsl-lite index fe4a62b38f..08022857f9 160000 --- a/metagraph/external-libraries/sdsl-lite +++ b/metagraph/external-libraries/sdsl-lite @@ -1 +1 @@ -Subproject commit fe4a62b38f5a835b8257b60f0701c74ebbc50a18 +Subproject commit 08022857f9835a0361a0a193e7f384adff58058f diff --git a/metagraph/external-libraries/zlib b/metagraph/external-libraries/zlib index d20bdfcd0e..1252e25655 160000 --- a/metagraph/external-libraries/zlib +++ b/metagraph/external-libraries/zlib @@ -1 +1 @@ -Subproject commit d20bdfcd0efbdd72cb9d857e098ceac1bad41432 +Subproject commit 1252e2565573fe150897c9d8b44d3453396575ff diff --git a/metagraph/src/common/bloom_filter.cpp b/metagraph/src/common/bloom_filter.cpp index f10fe30a1b..5b090a5c63 100644 --- a/metagraph/src/common/bloom_filter.cpp +++ b/metagraph/src/common/bloom_filter.cpp @@ -110,7 +110,8 @@ batch_insert_avx2(BloomFilter &bloom, for (; hashes_begin + 4 <= hashes_end; hashes_begin += 4) { simde__m256i block_indices = restrict_to_mask_epi64(hashes_begin, size, block_mask_out); - const uint64_t *block_index_array = reinterpret_cast(&block_indices); + alignas(32) uint64_t block_index_array[4]; + simde_mm256_store_si256(reinterpret_cast(block_index_array), block_indices); if (num_hash_functions_ > 1) { for (size_t j = 0; j < 4; ++j) { @@ -211,13 +212,13 @@ batch_check_avx2(const BloomFilter &bloom, const simde__m256i add = simde_mm256_setr_epi64x(0, 1, 2, 3); const simde__m256i numhash = simde_mm256_set1_epi64x(num_hash_functions_); - simde__m256i block_indices; - const uint64_t *block_index_array = reinterpret_cast(&block_indices); - // check four input elements (represented by hashes) at a time size_t i = 0; for (; hashes_begin + 4 <= hashes_end; hashes_begin += 4) { - block_indices = restrict_to_mask_epi64(hashes_begin, size, block_mask_out); + simde__m256i block_indices = restrict_to_mask_epi64(hashes_begin, size, block_mask_out); + alignas(32) uint64_t block_index_array[4]; + simde_mm256_store_si256(reinterpret_cast(block_index_array), block_indices); + if (num_hash_functions_ > 1) { for (size_t j = 0; j < 4; ++j) { diff --git a/metagraph/src/common/serialization.cpp b/metagraph/src/common/serialization.cpp index 80e0ee4252..ef97b3bee9 100644 --- a/metagraph/src/common/serialization.cpp +++ b/metagraph/src/common/serialization.cpp @@ -22,6 +22,7 @@ #endif +#include #include #include @@ -171,9 +172,7 @@ template bool load_number_vector(std::istream &in, std::vector *); void encode_utf8(uint32_t num, std::ostream &out) { if (num > 0x7FFFFFFF) throw std::runtime_error("Encoding value out of range for code."); - - std::string enc = std::wstring_convert, - char32_t>().to_bytes(num); + std::string enc = boost::locale::conv::utf_to_utf(std::u32string(1, num)); out.write(enc.c_str(), enc.size()); } diff --git a/metagraph/src/seq_io/sequence_io.cpp b/metagraph/src/seq_io/sequence_io.cpp index c7d9aa76a5..9af282291c 100644 --- a/metagraph/src/seq_io/sequence_io.cpp +++ b/metagraph/src/seq_io/sequence_io.cpp @@ -5,6 +5,8 @@ #include #include +#include + #include "common/seq_tools/reverse_complement.hpp" #include "common/utils/string_utils.hpp" #include "vcf_parser.hpp" diff --git a/metagraph/tests/test_utils.cpp b/metagraph/tests/test_utils.cpp index 030808c261..8ef7887896 100644 --- a/metagraph/tests/test_utils.cpp +++ b/metagraph/tests/test_utils.cpp @@ -102,7 +102,7 @@ TEST(Utils, TempFileCheckStateFlow) { { utils::TempFile tmp; ASSERT_TRUE(tmp.ifstream().good()); - EXPECT_DEBUG_DEATH(tmp.ofstream().good(), "Can't write after reading"); + EXPECT_DEBUG_DEATH((void)tmp.ofstream().good(), "Can't write after reading"); } { utils::TempFile tmp; @@ -110,7 +110,7 @@ TEST(Utils, TempFileCheckStateFlow) { ASSERT_TRUE(tmp.ofstream().good()); ASSERT_TRUE(tmp.ifstream().good()); ASSERT_TRUE(tmp.ifstream().good()); - EXPECT_DEBUG_DEATH(tmp.ofstream().good(), "Can't write after reading"); + EXPECT_DEBUG_DEATH((void)tmp.ofstream().good(), "Can't write after reading"); } }