From 303fadabf0206c06fc27c959eb03fb391e1713b8 Mon Sep 17 00:00:00 2001 From: MartijnCramer Date: Sat, 7 Nov 2020 15:49:31 +0100 Subject: [PATCH] fix OpenCL build error: call to 'sqrt' is ambiguous --- kinect2_registration/src/depth_registration.cl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kinect2_registration/src/depth_registration.cl b/kinect2_registration/src/depth_registration.cl index 4011b9ae..ba0c7972 100644 --- a/kinect2_registration/src/depth_registration.cl +++ b/kinect2_registration/src/depth_registration.cl @@ -187,7 +187,7 @@ void kernel remapDepth(global const ushort *in, global ushort *out, global const } const float4 distXY = (float4)((x - xL) * (x - xL), (xH - x) * (xH - x), (y - yL) * (y - yL), (yH - y) * (yH - y)); - const float4 tmp = (float4)(sqrt(2.0)); + const float4 tmp = (float4)(sqrt(2.0f)); const float4 dist2 = (float4)(distXY.s0 + distXY.s2, distXY.s1 + distXY.s2, distXY.s0 + distXY.s3, distXY.s1 + distXY.s3); const float4 dist = select((float4)(0), tmp - sqrt(dist2), valid); const float sum = dist.s0 + dist.s1 + dist.s2 + dist.s3;