voxcity.simulator_gpu.solar.reflection.OptimizedReflectionSolver

class voxcity.simulator_gpu.solar.reflection.OptimizedReflectionSolver(n_surfaces: int, max_svf_entries: int, n_reflection_steps: int = 3)

Optimized GPU solver for multi-bounce radiation reflections.

This replaces the per-step kernel launches with fused operations that run the entire reflection loop on GPU without CPU intervention.

n_surfaces
max_svf_entries
n_reflection_steps = 3
solve_reflections_fused(initial_sw: ti.template(), albedo: ti.template(), svf: ti.template(), svf_source: ti.template(), svf_target: ti.template(), svf_vf: ti.template(), svf_trans: ti.template(), svf_nnz: taichi.i32, n_steps: taichi.i32)

Fused kernel for complete multi-bounce reflection computation.

This runs all reflection iterations in a single kernel launch, eliminating CPU-GPU synchronization overhead between steps.

Uses ping-pong buffers to avoid race conditions between iterations.

get_results()

Get accumulated totals as numpy arrays.