Skip to content
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

std::clamp -> amrex::Clamp #4292

Merged
merged 1 commit into from
Jan 12, 2025
Merged

Conversation

WeiqunZhang
Copy link
Member

std::clamp is a constexpr function, and it is supposed to work in device code. However, std::clamp in gcc 14 seems to be incompatible with clang. This is causing clang based HIP compiler to fail on systems using gcc 14 libstd as reported by multiple users. Here we work around the issue by using amrex::Clamp instead.

std::clamp is a constexpr function, and it is supposed to work in device
code. However, std::clamp in gcc 14 seems to be incompatible with
clang. This is causing clang based HIP compiler to fail on systems using gcc
14 libstd as reported by multiple users. Here we work around the issue by
using amrex::Clamp instead.
@WeiqunZhang WeiqunZhang merged commit 1548946 into AMReX-Codes:development Jan 12, 2025
75 checks passed
@WeiqunZhang WeiqunZhang deleted the clamp branch January 12, 2025 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants