Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Fix host only compilation of <cuda/std/cmath> #234

Merged
merged 4 commits into from
Feb 13, 2022
Merged

Conversation

wmaxey
Copy link
Member

@wmaxey wmaxey commented Dec 7, 2021

This patch set fixes compilation on clang and gcc. Currently there are missing/extra definitions caused by nvcc including math.h by default.

VDVS: https://builds4u.nvidia.com/dvs/#/change/3067999458696529.1?eventType=Virtual&dvs_showStaging=on

@wmaxey wmaxey added the testing: internal ci passed Passed internal NVIDIA CI (DVS). label Dec 7, 2021
@wmaxey wmaxey requested a review from griwes December 7, 2021 22:35
@wmaxey wmaxey self-assigned this Dec 7, 2021
@@ -792,6 +792,11 @@ typedef __char32_t char32_t;
#define _LIBCUDACXX_HAS_NO_ASAN
#endif

// GCC implemented P0030R1 in 7.0, maybe only available under experimental?
#if _GNUC_VER < 700
#define _LIBCUDACXX_NO_HOST_CPP17_HYPOT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see a use of this in cmath that's being removed in this PR. Is this still needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed!

The __cuda_std__ guard is sufficient.
@wmaxey wmaxey merged commit 51ec23b into main Feb 13, 2022
@wmaxey wmaxey deleted the bugfix/cmath_host_only branch February 13, 2022 22:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testing: internal ci passed Passed internal NVIDIA CI (DVS).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants