From 2d65152e67d1ae673809551c95065e5efcee8922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ruilong=20Li=28=E6=9D=8E=E7=91=9E=E9=BE=99=29?= Date: Fri, 13 Oct 2023 11:00:15 -0700 Subject: [PATCH] num_sh_bases() is used in both host and device (#41) Co-authored-by: Ruilong Li <397653553@qq.com> --- gsplat/cuda/csrc/sh.cuh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gsplat/cuda/csrc/sh.cuh b/gsplat/cuda/csrc/sh.cuh index 4ef6eadcc..06946de4d 100644 --- a/gsplat/cuda/csrc/sh.cuh +++ b/gsplat/cuda/csrc/sh.cuh @@ -30,7 +30,8 @@ __device__ const float SH_C4[] = { -1.7701307697799304f, 0.6258357354491761f}; -__device__ unsigned num_sh_bases(const unsigned degree) { +// This function is used in both host and device code +__host__ __device__ unsigned num_sh_bases(const unsigned degree) { if (degree == 0) return 1; if (degree == 1)