Skip to content

Commit

Permalink
fix for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruilong Li committed Oct 13, 2023
1 parent 1e64d1c commit fc37467
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gsplat/cuda/csrc/forward.cu
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ void bin_and_sort_gaussians(

// sort intersections by ascending tile ID and depth with RadixSort
int32_t max_tile_id = (int32_t)(tile_bounds.x * tile_bounds.y);
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
int msb = 32 - __lzcnt(max_tile_id) + 1;
#else
int msb = 32 - __builtin_clz(max_tile_id) + 1;
#endif
// allocate workspace memory
void *sort_ws = nullptr;
size_t sort_ws_bytes;
Expand Down Expand Up @@ -662,7 +666,7 @@ __device__ float3 project_cov3d_ewa(
glm::mat3 cov = T * V * glm::transpose(T);

// add a little blur along axes and save upper triangular elements
return float3(float(cov[0][0]) + 0.3f, float(cov[0][1]), float(cov[1][1]) + 0.3f);
return make_float3(float(cov[0][0]) + 0.3f, float(cov[0][1]), float(cov[1][1]) + 0.3f);
}

// device helper to get 3D covariance from scale and quat parameters
Expand Down

0 comments on commit fc37467

Please sign in to comment.