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

Silence some static asserts in ptx helpers #1257

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,19 @@ inline _LIBCUDACXX_DEVICE _CUDA_VSTD::uint64_t __as_ptr_gmem(const void* __ptr)
template <typename _Tp>
inline _LIBCUDACXX_DEVICE _CUDA_VSTD::uint32_t __as_b32(_Tp __val)
{
#if _CCCL_STD_VER >= 2017 && !defined(_LIBCUDACXX_HAS_NO_CXX14_CONSTEXPR)
static_assert(sizeof(_Tp) == 4, "");
#endif // _CCCL_STD_VER >= 2017 && !_LIBCUDACXX_HAS_NO_CXX14_CONSTEXPR
// Consider using std::bitcast
return *reinterpret_cast<_CUDA_VSTD::uint32_t*>(&__val);
}

template <typename _Tp>
inline _LIBCUDACXX_DEVICE _CUDA_VSTD::uint64_t __as_b64(_Tp __val)
{
#if _CCCL_STD_VER >= 2017 && !defined(_LIBCUDACXX_HAS_NO_CXX14_CONSTEXPR)
static_assert(sizeof(_Tp) == 8, "");
#endif // _CCCL_STD_VER >= 2017 && !_LIBCUDACXX_HAS_NO_CXX14_CONSTEXPR
// Consider using std::bitcast
return *reinterpret_cast<_CUDA_VSTD::uint64_t*>(&__val);
}
Expand Down
Loading