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 truncation of constant value #1097

Merged
merged 2 commits into from
Nov 14, 2023
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
7 changes: 7 additions & 0 deletions libcudacxx/include/cuda/std/detail/libcxx/include/limits
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,18 @@ protected:
static constexpr float_round_style round_style = round_toward_zero;
};

#if defined(_LIBCUDACXX_COMPILER_MSVC)
# pragma warning(push)
# pragma warning(disable : 4309)
#endif // _LIBCUDACXX_COMPILER_MSVC
template <class _Tp, int __digits, bool _IsSigned>
struct __libcpp_compute_min
{
static constexpr _Tp value = static_cast<_Tp>(_Tp(1) << __digits);
};
#if defined(_LIBCUDACXX_COMPILER_MSVC)
# pragma warning(pop)
#endif // _LIBCUDACXX_COMPILER_MSVC

template <class _Tp, int __digits>
struct __libcpp_compute_min<_Tp, __digits, false>
Expand Down
Loading