celeritas-project / celeritas

Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
https://celeritas-project.github.io/celeritas/
Other
64 stars 35 forks source link

Define hypotenuse function using fma #1513

Closed sethrj closed 3 days ago

sethrj commented 3 days ago

Following on to #1510 this adds a hypot function to allow us to add a platform-independent and potentially higher accuracy definition. The current implementation uses std::fma rather than ipow to reduce the number of floating point operations and registers.