ToruNiina / lbvh

an implementation of parallel linear BVH (LBVH) on GPU
MIT License
178 stars 26 forks source link

I get an error when I try to build the project #4

Closed jlxy11 closed 1 year ago

jlxy11 commented 1 year ago

I used msvs and cuda12.0

1>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\include\cuda\std\detail/libcxx/include/type_traits(4404): error C2338: Attempt to use an extended device lambda in a context that requires querying its return type in host code. Use a named function object, a host device lambda, or cuda::proclaim_return_type instead. 1>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\include\cuda\std\detail/libcxx/include/type_traits(4416): note: 查看对正在编译的 类 模板 实例化“cuda::std::4::invoke_of<_Fp,lbvh::aabb,lbvh::aabb>”的引用 1> with 1> [ 1> _Fp=nv_dl_wrapper_t<nv_dl_tag<void (cdecl lbvh::bvh<float,float4,aabb_getter,lbvh::default_morton_code_calculator<float,float4>>::* )(void),void lbvh::bvh<float,float4,aabb_getter,lbvh::default_morton_code_calculator<float,float4>>::construct(void),1>> 1> ] 1>C:\Users\91929\AppData\Local\Temp\tmpxft_00003454_00000000-7_main.cudafe1.stub.c(153): note: 查看对正在编译的 类 模板 实例化“cuda::std::4::result_of<nv_dl_wrapper_t<nv_dl_tag<void (cdecl lbvh::bvh<float,float4,aabb_getter,lbvh::default_morton_code_calculator<Real,Object>>::* )(void),void lbvh::bvh<Real,Object,aabb_getter,lbvh::default_morton_code_calculator<Real,Object>>::construct(void),1>> (lbvh::aabb,lbvh::aabb)>”的引用 1> with 1> [ 1> Real=float, 1> Object=float4 1> ] 1>C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.0/include\cub/detail/type_traits.cuh(53): note: 查看对正在编译的 别名 模板 实例化“cub::detail::invoke_result_t<nv_dl_wrapper_t<nv_dl_tag<void (cdecl lbvh::bvh<float,float4,aabb_getter,lbvh::default_morton_code_calculator<Real,Object>>:: )(void),void lbvh::bvh<Real,Object,aabb_getter,lbvh::default_morton_code_calculator<Real,Object>>::construct(void),1>>,lbvh::aabb,lbvh::aabb>”的引用 1> with 1> [ 1> Real=float, 1> Object=float4 1> ] 1>C:\Users\91929\AppData\Local\Temp\tmpxft_00003454_00000000-7_main.cudafe1.stub.c(153): note: 查看对正在编译的 别名 模板 实例化“cub::detail::accumulator_t<__nv_dl_wrapper_t<nv_dl_tag<void (cdecl lbvh::bvh<float,float4,aabb_getter,lbvh::default_morton_code_calculator<Real,Object>>:: )(void),void lbvh::bvh<Real,Object,aabb_getter,lbvh::default_morton_code_calculator<Real,Object>>::construct(void),1>>,lbvh::aabb,lbvh::aabb>”的引用 1> with 1> [ 1> Real=float, 1> Object=float4 1> ]

jlxy11 commented 1 year ago

Hopefully someone can help me!

jlxy11 commented 1 year ago

done! Use a named function object, a host device lambda, or cuda::proclaim_return_type instead.