Skip to content

Commit

Permalink
Drop cub::DivideAndRoundUp (NVIDIA#3347)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber authored Jan 13, 2025
1 parent 18b8e43 commit 6a0f48b
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions cub/cub/util_math.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,6 @@ _CCCL_HOST_DEVICE _CCCL_FORCEINLINE OffsetT safe_add_bound_to_max(OffsetT lhs, O

} // namespace detail

/**
* Divide n by d, round up if any remainder, and return the result.
*
* Effectively performs `(n + d - 1) / d`, but is robust against the case where
* `(n + d - 1)` would overflow.
* deprecated [Since 2.8.0] `cub::DivideAndRoundUp` is deprecated. Use `cuda::ceil_div` instead.
*/
template <typename NumeratorT, typename DenominatorT>
CCCL_DEPRECATED_BECAUSE("Use cuda::ceil_div instead")
_CCCL_HOST_DEVICE _CCCL_FORCEINLINE constexpr NumeratorT DivideAndRoundUp(NumeratorT n, DenominatorT d)
{
static_assert(
cub::detail::is_integral_or_enum<NumeratorT>::value && cub::detail::is_integral_or_enum<DenominatorT>::value,
"DivideAndRoundUp is only intended for integral types.");
return ::cuda::ceil_div(n, d);
}

constexpr _CCCL_HOST_DEVICE int Nominal4BItemsToItemsCombined(int nominal_4b_items_per_thread, int combined_bytes)
{
return (cub::min)(nominal_4b_items_per_thread, (cub::max)(1, nominal_4b_items_per_thread * 8 / combined_bytes));
Expand Down

0 comments on commit 6a0f48b

Please sign in to comment.