vibespatial.kernels.constructive.shared_paths

NVRTC kernel source for shared_paths (binary constructive).

Tier 1 NVRTC (ADR-0033) – geometry-specific inner loops that iterate all segment pairs across two linear geometries and detect collinear overlapping segments, classifying them as forward (same direction) or backward (opposite direction).

ADR-0002: CONSTRUCTIVE class – stays fp64 on all devices per policy. PrecisionPlan is wired through dispatch for observability.

The kernel uses a two-pass count-scatter pattern:

Pass 0 (count): each thread counts shared segments for its geometry pair Prefix sum: exclusive_sum(counts) -> offsets Pass 1 (scatter): each thread writes shared segment coords + direction flags

Output arrays:
  • out_x1, out_y1, out_x2, out_y2: segment endpoint coordinates

  • out_dir: 0 = forward, 1 = backward

Attributes

Module Contents

vibespatial.kernels.constructive.shared_paths.SHARED_PATHS_KERNEL_NAMES: tuple[str, Ellipsis] = ('shared_paths_ls_ls_count', 'shared_paths_ls_ls_scatter', 'shared_paths_mls_ls_count',...