diff --git a/cuBQL/builder/cuda.h b/cuBQL/builder/cuda.h index 76a7f27..f15dad8 100644 --- a/cuBQL/builder/cuda.h +++ b/cuBQL/builder/cuda.h @@ -12,7 +12,6 @@ # include namespace cuBQL { - // ------------------------------------------------------------------ /*! defines a 'memory resource' that can be used for allocating gpu memory; this allows the user to switch between usign diff --git a/cuBQL/builder/cuda/builder_common.h b/cuBQL/builder/cuda/builder_common.h index 27d50df..e71b901 100644 --- a/cuBQL/builder/cuda/builder_common.h +++ b/cuBQL/builder/cuda/builder_common.h @@ -191,11 +191,6 @@ namespace cuBQL { typename int_type_of::type lower[box_t::numDims]; typename int_type_of::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 @@ -203,14 +198,7 @@ namespace cuBQL { AtomicBox::get_center(int dim) const { return (get_lower(dim)+get_upper(dim))/(AtomicBox::scalar_t)2; - // return 0.5f*(decode(lower[dim])+decode(upper[dim])); } - // template - // inline __device__ float AtomicBox::get_center(int dim) const - // { - // return 0.5f*(get_lower(dim)+get_upper(dim)); - // // return 0.5f*(decode(lower[dim])+decode(upper[dim])); - // } template inline __device__ box_t AtomicBox::make_box() const @@ -225,23 +213,6 @@ namespace cuBQL { return box; } - // template - // inline __device__ int32_t AtomicBox::encode(float f) - // { - // const int32_t sign = 0x80000000; - // int32_t bits = __float_as_int(f); - // if (bits & sign) bits ^= 0x7fffffff; - // return bits; - // } - - // template - // inline __device__ float AtomicBox::decode(int32_t bits) - // { - // const int32_t sign = 0x80000000; - // if (bits & sign) bits ^= 0x7fffffff; - // return __int_as_float(bits); - // } - template inline __device__ void AtomicBox::set_empty() { diff --git a/cuBQL/builder/cuda/gpu_builder.h b/cuBQL/builder/cuda/gpu_builder.h index 37aee9f..18365f7 100644 --- a/cuBQL/builder/cuda/gpu_builder.h +++ b/cuBQL/builder/cuda/gpu_builder.h @@ -9,7 +9,6 @@ #include "cuBQL/builder/cuda/elh_builder.h" namespace cuBQL { - template struct is3f { enum { value = false }; }; template<> @@ -69,7 +68,6 @@ namespace cuBQL { bvh.primIDs = 0; } } -} - - + +} // ::cuBQL diff --git a/cuBQL/builder/cuda/instantiate_builders.cu b/cuBQL/builder/cuda/instantiate_builders.cu index b54d5ef..7d9c667 100644 --- a/cuBQL/builder/cuda/instantiate_builders.cu +++ b/cuBQL/builder/cuda/instantiate_builders.cu @@ -88,4 +88,3 @@ CUBQL_INSTANTIATE_WIDE_BVH(float,3,8) CUBQL_INSTANTIATE_WIDE_BVH(float,3,16) #endif - diff --git a/cuBQL/bvh.h b/cuBQL/bvh.h index 73fe0cd..1ab1941 100644 --- a/cuBQL/bvh.h +++ b/cuBQL/bvh.h @@ -6,9 +6,9 @@ #include "cuBQL/math/common.h" #include "cuBQL/math/vec.h" #include "cuBQL/math/box.h" -#ifdef __CUDACC__ -# include -#endif +// #ifdef __CUDACC__ +// # include +// #endif namespace cuBQL { @@ -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 diff --git a/cuBQL/math/common.h b/cuBQL/math/common.h index 710786e..a3063dd 100644 --- a/cuBQL/math/common.h +++ b/cuBQL/math/common.h @@ -30,6 +30,8 @@ # include #elif defined(__CUDACC__) # include +// on cuda 13.2/gcc 15.2/ubuntu 25.10 we need to include that before cuda.h gets included +# include #endif #ifdef _WIN32