From 9c1ff905f6a1ffe37dd1ecc8a6ff14948f656ecc Mon Sep 17 00:00:00 2001 From: ThiagoIze <10453105+ThiagoIze@users.noreply.github.com> Date: Fri, 20 Feb 2026 14:07:34 -0700 Subject: [PATCH 1/4] Use the right type of infinity so we don't get a compiler warning. --- cuBQL/queries/pointData/findClosest.h | 18 +++++++++--------- cuBQL/queries/pointData/knn.h | 2 +- .../math/boxTriangleIntersections.h | 2 +- .../math/pointToTriangleDistance.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cuBQL/queries/pointData/findClosest.h b/cuBQL/queries/pointData/findClosest.h index d8c0ee1..dcfed2b 100644 --- a/cuBQL/queries/pointData/findClosest.h +++ b/cuBQL/queries/pointData/findClosest.h @@ -46,7 +46,7 @@ namespace cuBQL { /*! square of the maximum query distance in which this query is to look for candidates. note this is the SQUARE distance */ - float squareOfMaxQueryDistance=INFINITY); + float squareOfMaxQueryDistance=PosInfTy()); /*! given a (W-wide) bvh build over a set of float points, perform a closest-point query that returns the index of the @@ -77,7 +77,7 @@ namespace cuBQL { /*! square of the maximum query distance in which this query is to look for candidates. note this is the SQUARE distance */ - float squareOfMaxQueryDistance=INFINITY); + float squareOfMaxQueryDistance=PosInfTy()); template @@ -95,7 +95,7 @@ namespace cuBQL { /*! square of the maximum query distance in which this query is to look for candidates. note this is the SQUARE distance */ - float squareOfMaxQueryDistance=INFINITY); + float squareOfMaxQueryDistance=PosInfTy()); template /*! same as regular points::closestPoint, but excluding all data @@ -112,7 +112,7 @@ namespace cuBQL { /*! square of the maximum query distance in which this query is to look for candidates. note this is the SQUARE distance */ - float squareOfMaxQueryDistance=INFINITY); + float squareOfMaxQueryDistance=PosInfTy()); #ifdef __CUDACC__ // ****************************************************************** @@ -128,7 +128,7 @@ namespace cuBQL { /*! square of the maximum query distance in which this query is to look for candidates. note this is the SQUARE distance */ - float squareOfMaxQueryDistance=INFINITY); + float squareOfMaxQueryDistance=PosInfTy()); // ****************************************************************** /*! variant of cuBQL::point::findClosest() that's specialized for @@ -143,7 +143,7 @@ namespace cuBQL { /*! square of the maximum query distance in which this query is to look for candidates. note this is the SQUARE distance */ - float squareOfMaxQueryDistance=INFINITY); + float squareOfMaxQueryDistance=PosInfTy()); // ****************************************************************** /*! variant of cuBQL::point::findClosest() that's specialized for @@ -158,7 +158,7 @@ namespace cuBQL { /*! square of the maximum query distance in which this query is to look for candidates. note this is the SQUARE distance */ - float squareOfMaxQueryDistance=INFINITY); + float squareOfMaxQueryDistance=PosInfTy()); #endif // ****************************************************************** @@ -179,7 +179,7 @@ namespace cuBQL { /*! square of the maximum query distance in which this query is to look for candidates. note this is the SQUARE distance */ - float squareOfMaxQueryDistance=INFINITY) + float squareOfMaxQueryDistance=PosInfTy()) { int closestID = -1; float closestSqrDist = squareOfMaxQueryDistance; @@ -227,7 +227,7 @@ namespace cuBQL { /*! square of the maximum query distance in which this query is to look for candidates. note this is the SQUARE distance */ - float squareOfMaxQueryDistance=INFINITY) + float squareOfMaxQueryDistance=PosInfTy()) { int closestID = -1; float closestSqrDist = squareOfMaxQueryDistance; diff --git a/cuBQL/queries/pointData/knn.h b/cuBQL/queries/pointData/knn.h index e8eff09..3447c89 100644 --- a/cuBQL/queries/pointData/knn.h +++ b/cuBQL/queries/pointData/knn.h @@ -52,7 +52,7 @@ namespace cuBQL { /*! square of the maximum query distance in which this query is to look for candidates. note this is the SQUARE distance */ - float squareOfMaxQueryDistance=INFINITY); + float squareOfMaxQueryDistance=PosInfTy()); // ****************************************************************** diff --git a/cuBQL/queries/triangleData/math/boxTriangleIntersections.h b/cuBQL/queries/triangleData/math/boxTriangleIntersections.h index 38df3ac..4352c5d 100644 --- a/cuBQL/queries/triangleData/math/boxTriangleIntersections.h +++ b/cuBQL/queries/triangleData/math/boxTriangleIntersections.h @@ -85,7 +85,7 @@ namespace cuBQL { entirely within that slab (iff lower_k <= a_k <= upper_k), or entirely outside */ if (a_k > upper_k || a_k < lower_k) { - t0 = INFINITY; t1 = -INFINITY; + t0 = PosInfTy(); t1 = -PosInfTy(); } } else { /* line segment is not parallel to the slab planes, so we can diff --git a/cuBQL/queries/triangleData/math/pointToTriangleDistance.h b/cuBQL/queries/triangleData/math/pointToTriangleDistance.h index b566ff3..233b6be 100644 --- a/cuBQL/queries/triangleData/math/pointToTriangleDistance.h +++ b/cuBQL/queries/triangleData/math/pointToTriangleDistance.h @@ -15,7 +15,7 @@ namespace cuBQL { struct PointToTriangleTestResult { /*! (square!) distance between query point and closest point on triangle.*/ - float sqrDist = INFINITY; + float sqrDist = PosInfTy(); /*! the actual 3D point that's closest on the triangle */ vec3f P; }; From 769638f7ff2eedacf4d42686220b905d6e5b41de Mon Sep 17 00:00:00 2001 From: Ingo Wald Date: Sun, 22 Feb 2026 13:37:15 -0700 Subject: [PATCH 2/4] fixed posinfty related error that broke CI --- cuBQL/queries/triangleData/math/boxTriangleIntersections.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuBQL/queries/triangleData/math/boxTriangleIntersections.h b/cuBQL/queries/triangleData/math/boxTriangleIntersections.h index 4352c5d..b32ffcf 100644 --- a/cuBQL/queries/triangleData/math/boxTriangleIntersections.h +++ b/cuBQL/queries/triangleData/math/boxTriangleIntersections.h @@ -85,7 +85,7 @@ namespace cuBQL { entirely within that slab (iff lower_k <= a_k <= upper_k), or entirely outside */ if (a_k > upper_k || a_k < lower_k) { - t0 = PosInfTy(); t1 = -PosInfTy(); + t0 = (float)PosInfTy(); t1 = -(float)PosInfTy(); } } else { /* line segment is not parallel to the slab planes, so we can From 93c362b888f677356ab4a702ce87900a6f7a2dd9 Mon Sep 17 00:00:00 2001 From: Ingo Wald Date: Sun, 22 Feb 2026 13:57:25 -0700 Subject: [PATCH 3/4] Update cuBQL/queries/triangleData/math/boxTriangleIntersections.h Co-authored-by: Thiago Ize Signed-off-by: Ingo Wald --- cuBQL/queries/triangleData/math/boxTriangleIntersections.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuBQL/queries/triangleData/math/boxTriangleIntersections.h b/cuBQL/queries/triangleData/math/boxTriangleIntersections.h index b32ffcf..9967a01 100644 --- a/cuBQL/queries/triangleData/math/boxTriangleIntersections.h +++ b/cuBQL/queries/triangleData/math/boxTriangleIntersections.h @@ -85,7 +85,7 @@ namespace cuBQL { entirely within that slab (iff lower_k <= a_k <= upper_k), or entirely outside */ if (a_k > upper_k || a_k < lower_k) { - t0 = (float)PosInfTy(); t1 = -(float)PosInfTy(); + t0 = PosInfTy(); t1 = NegInfTy; } } else { /* line segment is not parallel to the slab planes, so we can From eb401bd20472d3df79d9506cdb30084b0eb3e3a8 Mon Sep 17 00:00:00 2001 From: Ingo Wald Date: Sun, 22 Feb 2026 13:58:09 -0700 Subject: [PATCH 4/4] Update boxTriangleIntersections.h Signed-off-by: Ingo Wald --- cuBQL/queries/triangleData/math/boxTriangleIntersections.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuBQL/queries/triangleData/math/boxTriangleIntersections.h b/cuBQL/queries/triangleData/math/boxTriangleIntersections.h index 9967a01..629aac5 100644 --- a/cuBQL/queries/triangleData/math/boxTriangleIntersections.h +++ b/cuBQL/queries/triangleData/math/boxTriangleIntersections.h @@ -85,7 +85,7 @@ namespace cuBQL { entirely within that slab (iff lower_k <= a_k <= upper_k), or entirely outside */ if (a_k > upper_k || a_k < lower_k) { - t0 = PosInfTy(); t1 = NegInfTy; + t0 = PosInfTy(); t1 = NegInfTy(); } } else { /* line segment is not parallel to the slab planes, so we can