voxcity.simulator_gpu.visibility.workspaceΒΆ

Reusable GPU field workspace for VoxCity visibility calculations.

A single ViewWorkspace allocates all Taichi fields required by ViewCalculator.compute_view_index() once and reuses them across calls that share the same grid and ray-direction configuration. This prevents GPU memory growth when the optimizer calls the view index hundreds of times with the same scene dimensions.

Cache management is handled by _get_or_create_view_workspace() and clear_visibility_cache() in integration.py.

ClassesΒΆ

ViewWorkspaceKey

Immutable key that identifies a unique workspace allocation shape.

SurfaceViewWorkspaceKey

Immutable key for reusable building-surface visibility fields.

ViewWorkspace

Pre-allocated Taichi fields for one visibility-ray configuration.

SurfaceViewWorkspace

Pre-allocated Taichi fields for one surface visibility configuration.