Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cuBQL/builder/cuda.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# include <mutex>

namespace cuBQL {

// ------------------------------------------------------------------
/*! defines a 'memory resource' that can be used for allocating gpu
memory; this allows the user to switch between usign
Expand Down
29 changes: 0 additions & 29 deletions cuBQL/builder/cuda/builder_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,26 +191,14 @@ namespace cuBQL {

typename int_type_of<scalar_t>::type lower[box_t::numDims];
typename int_type_of<scalar_t>::type upper[box_t::numDims];
// int32_t lower[box_t::numDims];
// int32_t upper[box_t::numDims];

// inline static __device__ int32_t encode(float f);
// inline static __device__ float decode(int32_t bits);
};

template<typename box_t>
inline __device__ typename AtomicBox<box_t>::scalar_t
AtomicBox<box_t>::get_center(int dim) const
{
return (get_lower(dim)+get_upper(dim))/(AtomicBox<box_t>::scalar_t)2;
// return 0.5f*(decode(lower[dim])+decode(upper[dim]));
}
// template<typename box_t>
// inline __device__ float AtomicBox<box_t>::get_center(int dim) const
// {
// return 0.5f*(get_lower(dim)+get_upper(dim));
// // return 0.5f*(decode(lower[dim])+decode(upper[dim]));
// }

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

// template<typename box_t>
// inline __device__ int32_t AtomicBox<box_t>::encode(float f)
// {
// const int32_t sign = 0x80000000;
// int32_t bits = __float_as_int(f);
// if (bits & sign) bits ^= 0x7fffffff;
// return bits;
// }

// template<typename box_t>
// inline __device__ float AtomicBox<box_t>::decode(int32_t bits)
// {
// const int32_t sign = 0x80000000;
// if (bits & sign) bits ^= 0x7fffffff;
// return __int_as_float(bits);
// }

template<typename box_t>
inline __device__ void AtomicBox<box_t>::set_empty()
{
Expand Down
6 changes: 2 additions & 4 deletions cuBQL/builder/cuda/gpu_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "cuBQL/builder/cuda/elh_builder.h"

namespace cuBQL {

template<typename T, int D>
struct is3f { enum { value = false }; };
template<>
Expand Down Expand Up @@ -69,7 +68,6 @@ namespace cuBQL {
bvh.primIDs = 0;
}
}
}



} // ::cuBQL

1 change: 0 additions & 1 deletion cuBQL/builder/cuda/instantiate_builders.cu
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,3 @@ CUBQL_INSTANTIATE_WIDE_BVH(float,3,8)
CUBQL_INSTANTIATE_WIDE_BVH(float,3,16)
#endif


10 changes: 6 additions & 4 deletions cuBQL/bvh.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include "cuBQL/math/common.h"
#include "cuBQL/math/vec.h"
#include "cuBQL/math/box.h"
#ifdef __CUDACC__
# include <cuda.h>
#endif
// #ifdef __CUDACC__
// # include <cuda.h>
// #endif

namespace cuBQL {

Expand Down Expand Up @@ -156,8 +156,10 @@ namespace cuBQL {
#ifdef __CUDACC__
# include "cuBQL/builder/cuda.h"
#endif
# include "cuBQL/builder/cpu.h"

#if XXX
# include "cuBQL/builder/cpu.h"
#endif



2 changes: 2 additions & 0 deletions cuBQL/math/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
# include <hip/hip_runtime.h>
#elif defined(__CUDACC__)
# include <cuda_runtime.h>
// on cuda 13.2/gcc 15.2/ubuntu 25.10 we need to include that before cuda.h gets included
# include <cub/cub.cuh>
#endif

#ifdef _WIN32
Expand Down