-
Notifications
You must be signed in to change notification settings - Fork 173
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
Refactor limits
and climits
#3221
base: main
Are you sure you want to change the base?
Conversation
#elif _CCCL_COMPILER(MSVC) | ||
# define _CCCL_BUILTIN_NANSL(...) static_cast<long double>(__builtin_nans(__VA_ARGS__)) | ||
#endif // _CCCL_CHECK_BUILTIN(builtin_nansl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wont work for older MSVC compiler < 19.34 which we still support, so I believe we need to add an elif branch for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested it on godbolt and it seems to be working fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you also check that they work with nvcc? Could be that there was some issue on that sid?
/ok to test |
}; | ||
|
||
_CCCL_DIAG_PUSH | ||
_CCCL_DIAG_SUPPRESS_MSVC(4309) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment what that warning is about? we try to better document those cases
/ok to test |
This PR implements refactor of
limits
andclimits
modules.Changes:
huge_val
,nan
andnans
are defined in the standard way and moved to__cccl/builtin.h
modulelimits
andclimits
are implemented directly in the header instead ofdetail/libcxx/include/
__cuda/climits_prelude.h
's contents are moved toclimits
numeric_limits
bit_cast
forinf
andnan
when no builtin is supported