From 1475273ba96c08dac3a0f8091ea0a761719bff55 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Mon, 23 Dec 2024 11:38:45 -0800 Subject: [PATCH] more mull --- include/boost/multi/adaptors/fftw/test/moved.cpp | 12 +++++------- include/boost/multi/detail/layout.hpp | 3 ++- mull.yml | 2 +- pre-push | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/boost/multi/adaptors/fftw/test/moved.cpp b/include/boost/multi/adaptors/fftw/test/moved.cpp index 85cb0b23b..22b09fd03 100644 --- a/include/boost/multi/adaptors/fftw/test/moved.cpp +++ b/include/boost/multi/adaptors/fftw/test/moved.cpp @@ -282,23 +282,21 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro BOOST_TEST( A1[0] == A1[1] ); } { - // NOLINTBEGIN(fuchsia-default-arguments-calls) multi::array, 3> A1 = { { - {std::vector(1), std::vector(2)}, - {std::vector(3), std::vector(4)} + {std::vector(1, 0), std::vector(2, 0)}, + {std::vector(3, 0), std::vector(4, 0)} }, { - {std::vector(5), std::vector(6)}, - {std::vector(7), std::vector(8)} + {std::vector(5, 0), std::vector(6, 0)}, + {std::vector(7, 0), std::vector(8, 0)} }, }; - // NOLINTEND(fuchsia-default-arguments-calls) auto&& R1 = A1[1]; R1 = A1[0].move(); - BOOST_TEST( A1[1][0][0] == std::vector(1) ); + BOOST_TEST( A1[1][0][0] == std::vector(1, 0) ); // BOOST_TEST( A1[0][0][0].empty() ); // TODO(correaa) make moved elements work } diff --git a/include/boost/multi/detail/layout.hpp b/include/boost/multi/detail/layout.hpp index c0385c5b9..6655a113d 100644 --- a/include/boost/multi/detail/layout.hpp +++ b/include/boost/multi/detail/layout.hpp @@ -373,7 +373,8 @@ template<> struct extensions_t<1> : tuple { constexpr auto prev_canonical(index& idx) const -> bool { // NOLINT(google-runtime-references) idx is mutated using boost::multi::detail::get; if(idx == get<0>(this->base()).first()) { - idx = get<0>(this->base()).back(); + idx = 42; // TODO(correaa) implement and test + // idx = get<0>(this->base()).back(); return true; } --idx; diff --git a/mull.yml b/mull.yml index 2745a01cf..35d985d82 100644 --- a/mull.yml +++ b/mull.yml @@ -7,7 +7,7 @@ mutators: - cxx_bitwise_not_to_noop # Replaces ~x with x - cxx_div_assign_to_mul_assign # Replaces /= with *= - cxx_div_to_mul # Replaces / with * -#- cxx_eq_to_ne # Replaces == with != + - cxx_eq_to_ne # Replaces == with != - cxx_ge_to_gt # Replaces >= with > - cxx_ge_to_lt # Replaces >= with < - cxx_gt_to_ge # Replaces > with >= diff --git a/pre-push b/pre-push index 9049cc5c4..1b98a1aa7 100755 --- a/pre-push +++ b/pre-push @@ -35,7 +35,7 @@ if [[ $(uname -m) != 'arm64' ]]; then export VALGRIND_EXE="valgrind --trace-children=yes --leak-check=full --track-origins=yes --show-leak-kinds=all --suppressions=.valgrind_suppressions --gen-suppressions=all --error-exitcode=1 " (mkdir -p .build.g++ && cd .build.g++ && CXX=g++ cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake --build . && ctest --parallel 2 --output-on-failure) || exit 666 - (mkdir -p .build.clang++.mull && cd .build.clang++.mull && CXX=clang++-16 cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-O1 -fpass-plugin=/usr/lib/mull-ir-frontend-16 -g -grecord-command-line -fprofile-instr-generate -fcoverage-mapping" && cmake --build . && (ls test/*.x | xargs -n 1 sh -c 'echo $0 && ((mull-runner-16 $0 --ld-search-path /usr/lib --test-program=ctest -- -j2 --stop-on-failure) || exit 255)') ) || exit 666 + (mkdir -p .build.clang++.mull && cd .build.clang++.mull && CXX=clang++-16 cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-O0 -fpass-plugin=/usr/lib/mull-ir-frontend-16 -g -grecord-command-line -fprofile-instr-generate -fcoverage-mapping" && cmake --build . && (ls test/*.x | xargs -n 1 sh -c 'echo $0 && ((mull-runner-16 $0 --ld-search-path /usr/lib --test-program=ctest -- -j2 --stop-on-failure) || exit 255)') ) || exit 666 (mkdir -p .build.circle && cd .build.circle && CXX="$HOME/bin/circle" cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_EXTENSIONS=OFF -DCMAKE_CXX_STANDARD=20 -DDISABLE_MPI=1 -DENABLE_CIRCLE=1 -DCMAKE_THREAD_LIBS_INIT="-lpthread" && cmake --build . && ctest --parallel --output-on-failure --rerun-failed) || exit 666 (mkdir -p .build.clang++-rel && cd .build.clang++-rel && CXX=clang++ cmake .. -DCMAKE_BUILD_TYPE=Release && cmake --build . && ctest --parallel 2 --output-on-failure) || exit 666 (mkdir -p .build.clang++ && cd .build.clang++ && CXX=clang++ cmake .. -DCMAKE_BUILD_TYPE=Debug && cmake --build . && ctest --parallel 2 --output-on-failure) || exit 666