MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / kernel

Function kernel

gsplat/cuda/_torch_impl.py:372–389  ·  view source on GitHub ↗
(cam_id, gauss_id)

Source from the content-addressed store, hash-verified

370 return "".join("{:0>8b}".format(c) for c in struct.pack("!f", num))
371
372 def kernel(cam_id, gauss_id):
373 if radii[cam_id, gauss_id] <= 0.0:
374 return
375 index = cam_id * N + gauss_id
376 curr_idx = cum_tiles_per_gauss[index - 1] if index > 0 else 0
377
378 depth_id = struct.unpack("i", struct.pack("f", depths[cam_id, gauss_id]))[0]
379
380 tile_min = tile_mins[cam_id, gauss_id]
381 tile_max = tile_maxs[cam_id, gauss_id]
382 for y in range(tile_min[1], tile_max[1]):
383 for x in range(tile_min[0], tile_max[0]):
384 tile_id = y * tile_width + x
385 isect_ids[curr_idx] = (
386 (cam_id << 32 << tile_n_bits) | (tile_id << 32) | depth_id
387 )
388 flatten_ids[curr_idx] = index # flattened index
389 curr_idx += 1
390
391 for cam_id in range(C):
392 for gauss_id in range(N):

Callers 1

_isect_tilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected