Repository navigation
Cleanup thrust::complex math includes and functions - #6546
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
miscco
force-pushed
the
thrust_complex_cleanup
branch
from
November 7, 2025 12:28
30d2551 to
bcabb15
Compare
Contributor
🥳 CI Workflow Results🟩 Finished in 2h 06m: Pass: 100%/70 | Total: 2d 01h | Max: 1h 53m | Hits: 79%/115316See results here. |
davebayer
approved these changes
Nov 7, 2025
Naraenda
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 26, 2026
…th includes and functions (NVIDIA/cccl#6546) Upstream: NVIDIA/cccl@24deb14 Took upstream complex math cleanup: deleted detail/complex/c99math.h (git rm; no remaining includers) and replaced unqualified/ADL math calls with qualified _THRUST_STD:: calls across detail/complex/*.h; removed the abs float/double specializations in arithmetic.h. Compatibility adjustments: upstream's libcu++-internal includes (_THRUST_STD_INCLUDE(__cmath/...), __type_traits/common_type.h) replaced by a single _THRUST_STD_INCLUDE(cmath) per file (works with ::std when libhipcxx is absent); arithmetic.h keeps _THRUST_STD_INCLUDE(cfloat) (FLT_MIN/DBL_MIN) and <thrust/detail/type_traits.h>; cpow.h keeps <thrust/detail/type_traits.h>; kept local ::internal::common_type_t instead of _THRUST_STD::common_type_t; complex.h kept ours (_THRUST_STD_INCLUDE(cmath)); csinhf.h kept cmath include; catrig.h additionally qualifies the remaining `isnan(rx)` as _THRUST_STD::isnan since c99math's using-declarations are gone. HIP counterpart (system/hip): no change; generic complex headers are used by HIP directly. test/: test_complex_various.cpp references thrust::detail::complex::hypot/hypotf only under `_MSC_VER <= 1500 && !defined(__clang__)` (dead for hipcc), no change. testing/: no counterpart. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
amd-jmahovsky
added a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 28, 2026
…th includes Related upstream commit: 24deb145aec Cleanup `thrust::complex` math includes and functions (NVIDIA/cccl#6546) Related upstream commit: 369f2f72eca Fix merge conflicts from dropping headers (NVIDIA/cccl#6563) Related local port commits: f58e510, 556bd2a libhipcxx is now mandatory, so the thrust::complex headers can use the same granular libhipcxx includes as upstream instead of the <cmath> umbrella: - thrust/detail/complex/*.h include the upstream __cmath/* headers (plus limits / __type_traits/common_type.h where upstream does). arithmetic.h keeps cfloat for FLT_MIN/DBL_MIN. - thrust/complex.h includes __type_traits/{common_type,remove_reference}.h as upstream and drops the dead !_THRUST_HAS_DEVICE_SYSTEM_STD <type_traits> fallback. - ::internal::common_type_t is replaced by _THRUST_STD::common_type_t (as upstream) in complex.h, arithmetic.h, cpow.h and test_complex.cpp, and the ::internal::common_type_t alias (TODO(libhipcxx)) is removed from thrust/detail/type_traits.h. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 29, 2026
…th includes and functions (NVIDIA/cccl#6546) Upstream: NVIDIA/cccl@24deb14 Took upstream complex math cleanup: deleted detail/complex/c99math.h (git rm; no remaining includers) and replaced unqualified/ADL math calls with qualified _THRUST_STD:: calls across detail/complex/*.h; removed the abs float/double specializations in arithmetic.h. Compatibility adjustments: upstream's libcu++-internal includes (_THRUST_STD_INCLUDE(__cmath/...), __type_traits/common_type.h) replaced by a single _THRUST_STD_INCLUDE(cmath) per file (works with ::std when libhipcxx is absent); arithmetic.h keeps _THRUST_STD_INCLUDE(cfloat) (FLT_MIN/DBL_MIN) and <thrust/detail/type_traits.h>; cpow.h keeps <thrust/detail/type_traits.h>; kept local ::internal::common_type_t instead of _THRUST_STD::common_type_t; complex.h kept ours (_THRUST_STD_INCLUDE(cmath)); csinhf.h kept cmath include; catrig.h additionally qualifies the remaining `isnan(rx)` as _THRUST_STD::isnan since c99math's using-declarations are gone. HIP counterpart (system/hip): no change; generic complex headers are used by HIP directly. test/: test_complex_various.cpp references thrust::detail::complex::hypot/hypotf only under `_MSC_VER <= 1500 && !defined(__clang__)` (dead for hipcc), no change. testing/: no counterpart. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 29, 2026
…th includes and functions (NVIDIA/cccl#6546) Upstream: NVIDIA/cccl@24deb14 Took upstream complex math cleanup: deleted detail/complex/c99math.h (git rm; no remaining includers) and replaced unqualified/ADL math calls with qualified _THRUST_STD:: calls across detail/complex/*.h; removed the abs float/double specializations in arithmetic.h. Compatibility adjustments: upstream's libcu++-internal includes (_THRUST_STD_INCLUDE(__cmath/...), __type_traits/common_type.h) replaced by a single _THRUST_STD_INCLUDE(cmath) per file (works with ::std when libhipcxx is absent); arithmetic.h keeps _THRUST_STD_INCLUDE(cfloat) (FLT_MIN/DBL_MIN) and <thrust/detail/type_traits.h>; cpow.h keeps <thrust/detail/type_traits.h>; kept local ::internal::common_type_t instead of _THRUST_STD::common_type_t; complex.h kept ours (_THRUST_STD_INCLUDE(cmath)); csinhf.h kept cmath include; catrig.h additionally qualifies the remaining `isnan(rx)` as _THRUST_STD::isnan since c99math's using-declarations are gone. HIP counterpart (system/hip): no change; generic complex headers are used by HIP directly. test/: test_complex_various.cpp references thrust::detail::complex::hypot/hypotf only under `_MSC_VER <= 1500 && !defined(__clang__)` (dead for hipcc), no change. testing/: no counterpart. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 29, 2026
…th includes Related upstream commit: 24deb145aec Cleanup `thrust::complex` math includes and functions (NVIDIA/cccl#6546) Related upstream commit: 369f2f72eca Fix merge conflicts from dropping headers (NVIDIA/cccl#6563) Related local port commits: f58e510, 556bd2a libhipcxx is now mandatory, so the thrust::complex headers can use the same granular libhipcxx includes as upstream instead of the <cmath> umbrella: - thrust/detail/complex/*.h include the upstream __cmath/* headers (plus limits / __type_traits/common_type.h where upstream does). arithmetic.h keeps cfloat for FLT_MIN/DBL_MIN. - thrust/complex.h includes __type_traits/{common_type,remove_reference}.h as upstream and drops the dead !_THRUST_HAS_DEVICE_SYSTEM_STD <type_traits> fallback. - ::internal::common_type_t is replaced by _THRUST_STD::common_type_t (as upstream) in complex.h, arithmetic.h, cpow.h and test_complex.cpp, and the ::internal::common_type_t alias (TODO(libhipcxx)) is removed from thrust/detail/type_traits.h. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 30, 2026
…th includes and functions (NVIDIA/cccl#6546) Upstream: NVIDIA/cccl@24deb14 Took upstream complex math cleanup: deleted detail/complex/c99math.h (git rm; no remaining includers) and replaced unqualified/ADL math calls with qualified _THRUST_STD:: calls across detail/complex/*.h; removed the abs float/double specializations in arithmetic.h. Compatibility adjustments: upstream's libcu++-internal includes (_THRUST_STD_INCLUDE(__cmath/...), __type_traits/common_type.h) replaced by a single _THRUST_STD_INCLUDE(cmath) per file (works with ::std when libhipcxx is absent); arithmetic.h keeps _THRUST_STD_INCLUDE(cfloat) (FLT_MIN/DBL_MIN) and <thrust/detail/type_traits.h>; cpow.h keeps <thrust/detail/type_traits.h>; kept local ::internal::common_type_t instead of _THRUST_STD::common_type_t; complex.h kept ours (_THRUST_STD_INCLUDE(cmath)); csinhf.h kept cmath include; catrig.h additionally qualifies the remaining `isnan(rx)` as _THRUST_STD::isnan since c99math's using-declarations are gone. HIP counterpart (system/hip): no change; generic complex headers are used by HIP directly. test/: test_complex_various.cpp references thrust::detail::complex::hypot/hypotf only under `_MSC_VER <= 1500 && !defined(__clang__)` (dead for hipcc), no change. testing/: no counterpart. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Beanavil
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 30, 2026
…th includes and functions (NVIDIA/cccl#6546) Upstream: NVIDIA/cccl@24deb14 Took upstream complex math cleanup: deleted detail/complex/c99math.h (git rm; no remaining includers) and replaced unqualified/ADL math calls with qualified _THRUST_STD:: calls across detail/complex/*.h; removed the abs float/double specializations in arithmetic.h. Compatibility adjustments: upstream's libcu++-internal includes (_THRUST_STD_INCLUDE(__cmath/...), __type_traits/common_type.h) replaced by a single _THRUST_STD_INCLUDE(cmath) per file (works with ::std when libhipcxx is absent); arithmetic.h keeps _THRUST_STD_INCLUDE(cfloat) (FLT_MIN/DBL_MIN) and <thrust/detail/type_traits.h>; cpow.h keeps <thrust/detail/type_traits.h>; kept local ::internal::common_type_t instead of _THRUST_STD::common_type_t; complex.h kept ours (_THRUST_STD_INCLUDE(cmath)); csinhf.h kept cmath include; catrig.h additionally qualifies the remaining `isnan(rx)` as _THRUST_STD::isnan since c99math's using-declarations are gone. HIP counterpart (system/hip): no change; generic complex headers are used by HIP directly. test/: test_complex_various.cpp references thrust::detail::complex::hypot/hypotf only under `_MSC_VER <= 1500 && !defined(__clang__)` (dead for hipcc), no change. testing/: no counterpart. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
amd-jmahovsky
added a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 30, 2026
…th includes Related upstream commit: 24deb145aec Cleanup `thrust::complex` math includes and functions (NVIDIA/cccl#6546) Related upstream commit: 369f2f72eca Fix merge conflicts from dropping headers (NVIDIA/cccl#6563) Related local port commits: f58e510, 556bd2a libhipcxx is now mandatory, so the thrust::complex headers can use the same granular libhipcxx includes as upstream instead of the <cmath> umbrella: - thrust/detail/complex/*.h include the upstream __cmath/* headers (plus limits / __type_traits/common_type.h where upstream does). arithmetic.h keeps cfloat for FLT_MIN/DBL_MIN. - thrust/complex.h includes __type_traits/{common_type,remove_reference}.h as upstream and drops the dead !_THRUST_HAS_DEVICE_SYSTEM_STD <type_traits> fallback. - ::internal::common_type_t is replaced by _THRUST_STD::common_type_t (as upstream) in complex.h, arithmetic.h, cpow.h and test_complex.cpp, and the ::internal::common_type_t alias (TODO(libhipcxx)) is removed from thrust/detail/type_traits.h. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.