Skip to content

Commit e9ddc2f

Browse files
committed
various cleanups, and fixes for cuda 13.2/gcc15.2/ubuntu25.10
1 parent ffa2bbb commit e9ddc2f

6 files changed

Lines changed: 10 additions & 39 deletions

File tree

cuBQL/builder/cuda.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# include <mutex>
1313

1414
namespace cuBQL {
15-
1615
// ------------------------------------------------------------------
1716
/*! defines a 'memory resource' that can be used for allocating gpu
1817
memory; this allows the user to switch between usign

cuBQL/builder/cuda/builder_common.h

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -191,26 +191,14 @@ namespace cuBQL {
191191

192192
typename int_type_of<scalar_t>::type lower[box_t::numDims];
193193
typename int_type_of<scalar_t>::type upper[box_t::numDims];
194-
// int32_t lower[box_t::numDims];
195-
// int32_t upper[box_t::numDims];
196-
197-
// inline static __device__ int32_t encode(float f);
198-
// inline static __device__ float decode(int32_t bits);
199194
};
200195

201196
template<typename box_t>
202197
inline __device__ typename AtomicBox<box_t>::scalar_t
203198
AtomicBox<box_t>::get_center(int dim) const
204199
{
205200
return (get_lower(dim)+get_upper(dim))/(AtomicBox<box_t>::scalar_t)2;
206-
// return 0.5f*(decode(lower[dim])+decode(upper[dim]));
207201
}
208-
// template<typename box_t>
209-
// inline __device__ float AtomicBox<box_t>::get_center(int dim) const
210-
// {
211-
// return 0.5f*(get_lower(dim)+get_upper(dim));
212-
// // return 0.5f*(decode(lower[dim])+decode(upper[dim]));
213-
// }
214202

215203
template<typename box_t>
216204
inline __device__ box_t AtomicBox<box_t>::make_box() const
@@ -225,23 +213,6 @@ namespace cuBQL {
225213
return box;
226214
}
227215

228-
// template<typename box_t>
229-
// inline __device__ int32_t AtomicBox<box_t>::encode(float f)
230-
// {
231-
// const int32_t sign = 0x80000000;
232-
// int32_t bits = __float_as_int(f);
233-
// if (bits & sign) bits ^= 0x7fffffff;
234-
// return bits;
235-
// }
236-
237-
// template<typename box_t>
238-
// inline __device__ float AtomicBox<box_t>::decode(int32_t bits)
239-
// {
240-
// const int32_t sign = 0x80000000;
241-
// if (bits & sign) bits ^= 0x7fffffff;
242-
// return __int_as_float(bits);
243-
// }
244-
245216
template<typename box_t>
246217
inline __device__ void AtomicBox<box_t>::set_empty()
247218
{

cuBQL/builder/cuda/gpu_builder.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "cuBQL/builder/cuda/elh_builder.h"
1010

1111
namespace cuBQL {
12-
1312
template<typename T, int D>
1413
struct is3f { enum { value = false }; };
1514
template<>
@@ -69,7 +68,6 @@ namespace cuBQL {
6968
bvh.primIDs = 0;
7069
}
7170
}
72-
}
73-
74-
71+
72+
} // ::cuBQL
7573

cuBQL/builder/cuda/instantiate_builders.cu

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,3 @@ CUBQL_INSTANTIATE_WIDE_BVH(float,3,8)
8888
CUBQL_INSTANTIATE_WIDE_BVH(float,3,16)
8989
#endif
9090

91-

cuBQL/bvh.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#include "cuBQL/math/common.h"
77
#include "cuBQL/math/vec.h"
88
#include "cuBQL/math/box.h"
9-
#ifdef __CUDACC__
10-
# include <cuda.h>
11-
#endif
9+
// #ifdef __CUDACC__
10+
// # include <cuda.h>
11+
// #endif
1212

1313
namespace cuBQL {
1414

@@ -156,8 +156,10 @@ namespace cuBQL {
156156
#ifdef __CUDACC__
157157
# include "cuBQL/builder/cuda.h"
158158
#endif
159-
# include "cuBQL/builder/cpu.h"
160159

160+
#if XXX
161+
# include "cuBQL/builder/cpu.h"
162+
#endif
161163

162164

163165

cuBQL/math/common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
# include <hip/hip_runtime.h>
3131
#elif defined(__CUDACC__)
3232
# include <cuda_runtime.h>
33+
// on cuda 13.2/gcc 15.2/ubuntu 25.10 we need to include that before cuda.h gets included
34+
# include <cub/cub.cuh>
3335
#endif
3436

3537
#ifdef _WIN32

0 commit comments

Comments
 (0)