Skip to content

Commit 150990b

Browse files
authored
GPU: give Metal an IEEE-754 binary64 in software (#15866)
1 parent 205248d commit 150990b

5 files changed

Lines changed: 608 additions & 3 deletions

File tree

‎Common/MathUtils/include/MathUtils/Utils.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ GPUdi() void sincos(float ang, float& s, float& c)
111111
{
112112
detail::sincos<float>(ang, s, c);
113113
}
114-
#ifndef __OPENCL__
114+
#if !defined(__OPENCL__) && !defined(__METAL__)
115115
GPUdi() void sincosd(double ang, double& s, double& c)
116116
{
117117
detail::sincos<double>(ang, s, c);

‎DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateTo(value_t xk, cons
638638
}
639639
double r1pr2Inv = 1. / (r1 + r2), r2inv = 1. / r2, r1inv = 1. / r1;
640640
double dy2dx = (f1 + f2) * r1pr2Inv, dx2r1pr2 = dx * r1pr2Inv;
641-
value_t step = (gpu::CAMath::Abs(x2r) < 0.05f) ? dx * gpu::CAMath::Abs(r2 + f2 * dy2dx) // chord
641+
value_t step = (gpu::CAMath::Abs(x2r) < 0.05f) ? value_t(dx * gpu::CAMath::Abs(r2 + f2 * dy2dx)) // chord
642642
: 2.f * gpu::CAMath::ASin(0.5f * dx * gpu::CAMath::Sqrt(1.f + dy2dx * dy2dx) * crv) / crv; // arc
643643
step *= gpu::CAMath::Sqrt(1.f + this->getTgl() * this->getTgl());
644644
//

0 commit comments

Comments
 (0)