diff --git a/CMakeLists.txt b/CMakeLists.txt index 902a62e..a9e46fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ #****************************************************************************# # Require at least 3.8 so that we can set cmake_policy CMP0067 below -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.10) ##################### # Project description @@ -122,6 +122,8 @@ include_directories( ${CMAKE_SOURCE_DIR}/third_party ${PROJECT_BINARY_DIR}) +# add_compile_options(-Wall -Wextra -Wpedantic) + ######### # Testing diff --git a/include/hpcombi/bmat16_impl.hpp b/include/hpcombi/bmat16_impl.hpp index 146d0af..7459784 100644 --- a/include/hpcombi/bmat16_impl.hpp +++ b/include/hpcombi/bmat16_impl.hpp @@ -190,14 +190,14 @@ inline BMat16 BMat16::mult_naive(BMat16 const &that) const noexcept { c <<= 1; d <<= 1; for (size_t k = 0; k < 8; ++k) { - a |= ((*this)(i, k) & that(k, j)) | - ((*this)(i, k + 8) & that(k + 8, j)); - b |= ((*this)(i, k) & that(k, j + 8)) | - ((*this)(i, k + 8) & that(k + 8, j + 8)); - c |= ((*this)(i + 8, k) & that(k, j)) | - ((*this)(i + 8, k + 8) & that(k + 8, j)); - d |= ((*this)(i + 8, k) & that(k, j + 8)) | - ((*this)(i + 8, k + 8) & that(k + 8, j + 8)); + a |= ((*this)(i, k) && that(k, j)) || + ((*this)(i, k + 8) && that(k + 8, j)); + b |= ((*this)(i, k) && that(k, j + 8)) || + ((*this)(i, k + 8) && that(k + 8, j + 8)); + c |= ((*this)(i + 8, k) && that(k, j)) || + ((*this)(i + 8, k + 8) && that(k + 8, j)); + d |= ((*this)(i + 8, k) && that(k, j + 8)) || + ((*this)(i + 8, k + 8) && that(k + 8, j + 8)); } } } @@ -215,10 +215,10 @@ inline BMat16 BMat16::mult_naive_array(BMat16 const &that) const noexcept { c <<= 1; d <<= 1; for (size_t k = 0; k < 16; ++k) { - a |= tab1[i][k] & tab2[k][j]; - b |= tab1[i][k] & tab2[k][j + 8]; - c |= tab1[i + 8][k] & tab2[k][j]; - d |= tab1[i + 8][k] & tab2[k][j + 8]; + a |= tab1[i][k] && tab2[k][j]; + b |= tab1[i][k] && tab2[k][j + 8]; + c |= tab1[i + 8][k] && tab2[k][j]; + d |= tab1[i + 8][k] && tab2[k][j + 8]; } } } diff --git a/include/hpcombi/bmat8_impl.hpp b/include/hpcombi/bmat8_impl.hpp index 1456294..51beac2 100644 --- a/include/hpcombi/bmat8_impl.hpp +++ b/include/hpcombi/bmat8_impl.hpp @@ -251,7 +251,7 @@ inline BMat8 BMat8::mult_naive(BMat8 const &that) const noexcept { for (int j = 0; j < 8; j++) { a <<= 1; for (int k = 0; k < 8; k++) { - a |= ((*this)(i, k) & that(k, j)); + a |= ((*this)(i, k) && that(k, j)); } } } @@ -266,7 +266,7 @@ inline BMat8 BMat8::mult_naive_array(BMat8 const &that) const noexcept { for (int j = 0; j < 8; j++) { a <<= 1; for (int k = 0; k < 8; k++) { - a |= tab1[i][k] & tab2[k][j]; + a |= tab1[i][k] && tab2[k][j]; } } } diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 65302ea..7f3071c 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -31,13 +31,13 @@ struct HPCombiListener : Catch::EventListenerBase { std::cout << testInfo.tagsAsString() << " " << testInfo.name << std::endl; } - void testCaseEnded(Catch::TestCaseStats const &testInfo) override {} - void sectionStarting(Catch::SectionInfo const §ionStats) override {} - void sectionEnded(Catch::SectionStats const §ionStats) override {} - void testCasePartialStarting(Catch::TestCaseInfo const &testInfo, - uint64_t partNumber) override {} - void testCasePartialEnded(Catch::TestCaseStats const &testCaseStats, - uint64_t partNumber) override {} + void testCaseEnded(Catch::TestCaseStats const &) override {} + void sectionStarting(Catch::SectionInfo const &) override {} + void sectionEnded(Catch::SectionStats const &) override {} + void testCasePartialStarting(Catch::TestCaseInfo const &, + uint64_t) override {} + void testCasePartialEnded(Catch::TestCaseStats const &, uint64_t) override { + } }; CATCH_REGISTER_LISTENER(HPCombiListener)