Skip to content

Conversation

@AlexanderSinn
Copy link
Member

@AlexanderSinn AlexanderSinn commented Nov 12, 2025

Summary

This PR adds a function to compute the inverse square root of a single- or double-precision value. On GPUs this should be faster than doing the inverse and square root separately.

Additional background

https://godbolt.org/z/sb8P3TMvq

https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html#reciprocal-square-root

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@WeiqunZhang WeiqunZhang merged commit 010ee1f into AMReX-Codes:development Nov 13, 2025
73 checks passed
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