Skip to content

Commit

Permalink
more mull
Browse files Browse the repository at this point in the history
  • Loading branch information
alfC committed Dec 23, 2024
1 parent fd88406 commit 1475273
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
12 changes: 5 additions & 7 deletions include/boost/multi/adaptors/fftw/test/moved.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::vector<int>, 3> A1 = {
{
{std::vector<int>(1), std::vector<int>(2)},
{std::vector<int>(3), std::vector<int>(4)}
{std::vector<int>(1, 0), std::vector<int>(2, 0)},
{std::vector<int>(3, 0), std::vector<int>(4, 0)}
},
{
{std::vector<int>(5), std::vector<int>(6)},
{std::vector<int>(7), std::vector<int>(8)}
{std::vector<int>(5, 0), std::vector<int>(6, 0)},
{std::vector<int>(7, 0), std::vector<int>(8, 0)}
},
};
// NOLINTEND(fuchsia-default-arguments-calls)

auto&& R1 = A1[1];
R1 = A1[0].move();

BOOST_TEST( A1[1][0][0] == std::vector<int>(1) );
BOOST_TEST( A1[1][0][0] == std::vector<int>(1, 0) );
// BOOST_TEST( A1[0][0][0].empty() ); // TODO(correaa) make moved elements work
}

Expand Down
3 changes: 2 additions & 1 deletion include/boost/multi/detail/layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ template<> struct extensions_t<1> : tuple<multi::index_extension> {
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;
Expand Down
2 changes: 1 addition & 1 deletion mull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 >=
Expand Down
2 changes: 1 addition & 1 deletion pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1475273

Please sign in to comment.