Skip to content

Commit

Permalink
more tidy and mull
Browse files Browse the repository at this point in the history
  • Loading branch information
alfC committed Dec 23, 2024
1 parent 7a2eb4c commit db98a32
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Checks: '*,
-boost-use-ranges,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-fuchsia-overloaded-operator,
-fuchsia-trailing-return,
-llvmlibc-*,
Expand All @@ -43,6 +44,7 @@ Checks: '*,
# -boost-use-ranges // would introduce a dependency on Boost
# -clang-diagnostic-deprecated-declarations // some test run deprecated functions on purpose
# -cppcoreguidelines-avoid-magic-numbers, // all tests use magic numbers
# -cppcoreguidelines-pro-bounds-array-to-pointer-decay // for Boost Lightweight test BOOST_TEST
# -cppcoreguidelines-macro-usage, // BLAS adaptors uses a lot of macros
# -fuchsia-overloaded-operator, // this library overloads operators (==, <, +, &)
# -llvmlibc-*, // nonsense warnings, for llvm developers
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 @@ -847,7 +847,8 @@ struct layout_t

constexpr auto scale(size_type num, size_type den) const {
assert( (stride_*num) % den == 0 );
return layout_t{sub_.scale(num, den), stride_*num/den, offset_*num/den, nelems_*num/den};
assert(offset_ == 0); // TODO(correaa) implement ----------------vvv
return layout_t{sub_.scale(num, den), stride_*num/den, offset_ /* *num/den */, nelems_*num/den};
}
};

Expand Down
2 changes: 1 addition & 1 deletion test/element_access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro
{
auto beg1 = arr({1, 3}, {2, 5}).elements().begin();
auto end1 = arr({1, 3}, {2, 5}).elements().end();
for(;end1 != beg1; --end1) {} // NOLINT(altera-id-dependent-backward-branch)
for(;end1 != beg1; --end1) {} // NOLINT(altera-id-dependent-backward-branch,altera-unroll-loops)
BOOST_TEST( end1 == beg1 );
}
}
Expand Down

0 comments on commit db98a32

Please sign in to comment.