Skip to content

Cleanup thrust::complex math includes and functions - #6546

Merged
davebayer merged 1 commit into
NVIDIA:mainfrom
miscco:thrust_complex_cleanup
Nov 7, 2025
Merged

davebayer merged 1 commit into
NVIDIA:mainfrom
miscco:thrust_complex_cleanup

Conversation

@miscco

@miscco miscco commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@miscco
miscco requested a review from a team as a code owner November 7, 2025 08:58
@miscco
miscco requested a review from elstehle November 7, 2025 08:58
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Nov 7, 2025
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Nov 7, 2025
@github-actions

This comment has been minimized.

@miscco
miscco force-pushed the thrust_complex_cleanup branch from 30d2551 to bcabb15 Compare November 7, 2025 12:28
@github-actions

github-actions Bot commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 2h 06m: Pass: 100%/70 | Total: 2d 01h | Max: 1h 53m | Hits: 79%/115316

See results here.

@davebayer
davebayer merged commit 24deb14 into NVIDIA:main Nov 7, 2025
82 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Nov 7, 2025
@miscco
miscco deleted the thrust_complex_cleanup branch November 7, 2025 18:15
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants