Skip to content

Commit

Permalink
remove redundant _CCCL_ASSUME
Browse files Browse the repository at this point in the history
  • Loading branch information
fbusato committed Jan 30, 2025
1 parent ae84208 commit 864bbe0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions libcudacxx/include/cuda/std/__bit/countl.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ _CCCL_TEMPLATE(class _Tp)
_CCCL_REQUIRES(_CCCL_TRAIT(_CUDA_VSTD::__cccl_is_unsigned_integer, _Tp))
_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr int countl_one(_Tp __t) noexcept
{
auto __ret = _CUDA_VSTD::countl_zero(static_cast<_Tp>(~__t));
_CCCL_ASSUME(__ret >= 0 && __ret <= numeric_limits<_Tp>::digits);
return __ret;
return _CUDA_VSTD::countl_zero(static_cast<_Tp>(~__t));
}

_LIBCUDACXX_END_NAMESPACE_STD
Expand Down
4 changes: 1 addition & 3 deletions libcudacxx/include/cuda/std/__bit/countr.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ _CCCL_TEMPLATE(class _Tp)
_CCCL_REQUIRES(_CCCL_TRAIT(_CUDA_VSTD::__cccl_is_unsigned_integer, _Tp))
_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr int countr_one(_Tp __t) noexcept
{
auto __ret = _CUDA_VSTD::countr_zero(static_cast<_Tp>(~__t));
_CCCL_ASSUME(__ret >= 0 && __ret <= numeric_limits<_Tp>::digits);
return __ret;
return _CUDA_VSTD::countr_zero(static_cast<_Tp>(~__t));
}

_LIBCUDACXX_END_NAMESPACE_STD
Expand Down

0 comments on commit 864bbe0

Please sign in to comment.