Skip to content

Commit

Permalink
Replace redundant divRoundUp by divCeil
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Sep 26, 2023
1 parent cedb68d commit 9ba7ffc
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions include/llama/Proofs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@

namespace llama
{
namespace internal
{
constexpr auto divRoundUp(std::size_t dividend, std::size_t divisor) -> std::size_t
{
return (dividend + divisor - 1) / divisor;
}
} // namespace internal

// FIXME(bgruber): this test is actually not correct, because __cpp_constexpr_dynamic_alloc only guarantees constexpr
// std::allocator
#ifdef __cpp_constexpr_dynamic_alloc
Expand Down Expand Up @@ -58,7 +50,7 @@ namespace llama
{
internal::DynArray<internal::DynArray<std::uint64_t>> blobByteMapped(m.blobCount);
for(std::size_t i = 0; i < m.blobCount; i++)
blobByteMapped.data[i].resize(internal::divRoundUp(m.blobSize(i), 64));
blobByteMapped.data[i].resize(divCeil(m.blobSize(i), std::size_t{64}));

auto testAndSet = [&](auto blob, auto offset) constexpr
{
Expand Down

0 comments on commit 9ba7ffc

Please sign in to comment.