Skip to content

Commit 27128b4

Browse files
authored
Merge pull request #28 from ingowald/main
ray traversal kernels will do distance tracking on stack
2 parents 5a651b3 + 3bf2d03 commit 27128b4

File tree

16 files changed

+259
-218
lines changed

16 files changed

+259
-218
lines changed

.github/workflows/Ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
steps:
3737

38-
- name: Checkout OWL
38+
- name: Checkout cuBQL
3939
uses: actions/checkout@v5
4040
with:
4141
submodules: true

.github/workflows/Windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
visual_studio: "${{ matrix.visual-studio }}"
5050
build_dir: "build"
5151
steps:
52-
- name: Checkout owl
52+
- name: Checkout cuBQL
5353
uses: actions/checkout@v5
5454
with:
5555
submodules: true

CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA
2+
# CORPORATION & AFFILIATES. All rights reserved.
23
# SPDX-License-Identifier: Apache-2.0
34

45
cmake_minimum_required(VERSION 3.16)
56

7+
set(CUBQL_VERSION_MAJOR 1)
8+
set(CUBQL_VERSION_MINOR 3)
9+
set(CUBQL_VERSION_PATCH 0)
10+
set(CUBQL_VERSION ${CUBQL_VERSION_MAJOR}.${CUBQL_VERSION_MINOR}.${CUBQL_VERSION_PATCH})
11+
612
cmake_policy(SET CMP0048 NEW)
713
set(CMAKE_BUILD_TYPE_INIT "Release")
8-
project(cuBQL VERSION 1.2.0 LANGUAGES C CXX)
14+
project(cuBQL VERSION ${CUBQL_VERSION} LANGUAGES C CXX)
915

1016
if (CUBQL_OMP)
1117
set(CUBQL_DISABLE_CUDA ON)

cuBQL/builder/cuda/wide_gpu_builder.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@ namespace cuBQL {
137137
}
138138
while (numWritten < N) {
139139
target.children[numWritten].bounds.set_empty();
140-
// lower
141-
// = make_float3(+INFINITY,+INFINITY,+INFINITY);
142-
// target.children[numWritten].bounds.upper
143-
// = make_float3(-INFINITY,-INFINITY,-INFINITY);
144140
target.children[numWritten].offset = (uint32_t)-1;
145141
target.children[numWritten].count = (uint32_t)-1;
146142
target.children[numWritten].valid = 0;

cuBQL/math/affine.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,8 @@ namespace cuBQL {
221221
using affine3f = AffineSpace3f;
222222
using affine2d = AffineSpace2d;
223223
using affine3d = AffineSpace3d;
224+
225+
template<typename L>
226+
inline __cubql_both dbgout operator<<(dbgout o, const AffineSpaceT<L> &v)
227+
{ o << "Affine(" << v.l << "+" << v.p << ")"; return o; }
224228
} // ::cuBQL

cuBQL/math/conservativeDistances.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ namespace cuBQL {
6262
inline __cubql_both float fSqrLength_rd(vec_t<T,D> v)
6363
{
6464
float sum = 0.f;
65-
#pragma unroll
65+
// #pragma unroll
6666
for (int i=0;i<D;i++)
6767
sum += fSquare_rd(v[i]);
6868
return sum;

cuBQL/math/linear.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ namespace cuBQL {
328328
return cout << "{ vx = " << m.vx << ", vy = " << m.vy << ", vz = " << m.vz << "}";
329329
}
330330

331+
template<typename T>
332+
inline __cubql_both dbgout operator<<(dbgout o, const LinearSpace3<T> &m)
333+
{ o << "{ vx = " << m.vx << ", vy = " << m.vy << ", vz = " << m.vz << "}"; return o; }
334+
335+
331336
/*! Shortcuts for common linear spaces. */
332337
using LinearSpace2f = LinearSpace2<vec2f> ;
333338
using LinearSpace3f = LinearSpace3<vec3f> ;

cuBQL/math/math.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ namespace cuBQL {
2222
#endif
2323

2424
#ifdef __CUDA_ARCH__
25-
# define CUBQL_INF ::cuda::std::numeric_limits<float>::infinity()
25+
# define CUBQL_INF CUDART_INF_F
26+
// # define CUBQL_INF ::cuda::std::numeric_limits<float>::infinity()
2627
#else
2728
# define CUBQL_INF std::numeric_limits<float>::infinity()
2829
#endif
@@ -45,6 +46,7 @@ namespace cuBQL {
4546

4647
/*! square of a value */
4748
inline __cubql_both float sqr(float f) { return f*f; }
49+
inline __cubql_both double sqr(double f) { return f*f; }
4850

4951
/*! unary functors on scalar types, so we can lift them to vector types later on */
5052
inline __cubql_both float rcp(float f) { return 1.f/f; }

cuBQL/math/vec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ namespace cuBQL {
669669
inline __cubql_both bool operator==(const vec_t_data<T,D> &a,
670670
const vec_t_data<T,D> &b)
671671
{
672-
#pragma unroll
672+
CUBQL_PRAGMA_UNROLL
673673
for (int i=0;i<D;i++)
674674
if (a[i] != b[i]) return false;
675675
return true;

cuBQL/queries/triangleData/Triangle.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,6 @@ namespace cuBQL {
1515
// *** INTERFACE ***
1616
// =========================================================================
1717

18-
// /*! a simple triangle consisting of three vertices. In order to not
19-
// overload this class with too many functions the actual
20-
// operations on triangles - such as intersectin with a ray,
21-
// computing distance to a point, etc - will be defined in the
22-
// respective queries */
23-
// struct Triangle {
24-
// /*! returns an axis aligned bounding box enclosing this triangle */
25-
// inline __cubql_both box3f bounds() const;
26-
// inline __cubql_both vec3f sample(float u, float v) const;
27-
// inline __cubql_both vec3f normal() const;
28-
29-
// vec3f a, b, c;
30-
// };
31-
3218
template<typename T>
3319
struct triangle_t
3420
{

0 commit comments

Comments
 (0)