Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cuda::std::assume_aligned assertion #4023

Merged
merged 2 commits into from
Mar 5, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libcudacxx/include/cuda/std/__memory/assume_aligned.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ template <size_t _Align, class _Tp>
_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp* assume_aligned(_Tp* __ptr) noexcept
{
static_assert(_CUDA_VSTD::has_single_bit(_Align), "std::assume_aligned requires the alignment to be a power of 2");
static_assert(_Align >= sizeof(_Tp), "Alignment must be greater than or equal to the size of the input type");
static_assert(_Align >= alignof(_Tp), "Alignment must be greater than or equal to the size of the input type");
#if !defined(_CCCL_BUILTIN_IS_CONSTANT_EVALUATED)
return __ptr;
#else
Expand Down
Loading