Skip to content

Commit

Permalink
fix constant evaluation condition
Browse files Browse the repository at this point in the history
  • Loading branch information
davebayer committed Dec 14, 2024
1 parent 2c5fd5b commit bf5ade1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libcudacxx/include/cuda/std/__bit/byteswap.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class __byteswap_impl
return _CCCL_BUILTIN_BSWAP16(__val);
#else // ^^^ _CCCL_BUILTIN_BSWAP16 ^^^ / vvv !_CCCL_BUILTIN_BSWAP16 vvv
# if _CCCL_STD_VER >= 2014 && _CCCL_COMPILER(MSVC)
if (!_CUDA_VSTD::__cccl_default_is_constant_evaluated())
if (!_CUDA_VSTD::is_constant_evaluated())
{
NV_IF_TARGET(NV_IS_HOST, return _byteswap_ushort(__val);)
}
Expand All @@ -103,7 +103,7 @@ class __byteswap_impl
return _CCCL_BUILTIN_BSWAP32(__val);
#else // ^^^ _CCCL_BUILTIN_BSWAP32 ^^^ / vvv !_CCCL_BUILTIN_BSWAP32 vvv
# if _CCCL_STD_VER >= 2014
if (!_CUDA_VSTD::__cccl_default_is_constant_evaluated())
if (!_CUDA_VSTD::is_constant_evaluated())
{
# if _CCCL_COMPILER(MSVC)
NV_IF_TARGET(NV_IS_HOST, return _byteswap_ulong(__val);)
Expand All @@ -121,7 +121,7 @@ class __byteswap_impl
return _CCCL_BUILTIN_BSWAP64(__val);
#else // ^^^ _CCCL_BUILTIN_BSWAP64 ^^^ / vvv !_CCCL_BUILTIN_BSWAP64 vvv
# if _CCCL_STD_VER >= 2014
if (!_CUDA_VSTD::__cccl_default_is_constant_evaluated())
if (!_CUDA_VSTD::is_constant_evaluated())
{
# if _CCCL_COMPILER(MSVC)
NV_IF_TARGET(NV_IS_HOST, return _byteswap_uint64(__val);)
Expand Down

0 comments on commit bf5ade1

Please sign in to comment.