MCPcopy Create free account
hub / github.com/dcharatan/flowmap / generate_sample_grid

Function generate_sample_grid

flowmap/visualization/drawing/rendering.py:18–26  ·  view source on GitHub ↗
(
    shape: tuple[int, int],
    device: torch.device,
)

Source from the content-addressed store, hash-verified

16
17
18def generate_sample_grid(
19 shape: tuple[int, int],
20 device: torch.device,
21) -> Float[Tensor, "height width 2"]:
22 h, w = shape
23 x = torch.arange(w, device=device) + 0.5
24 y = torch.arange(h, device=device) + 0.5
25 x, y = torch.meshgrid(x, y, indexing="xy")
26 return torch.stack([x, y], dim=-1)
27
28
29def detect_msaa_pixels(

Callers 2

run_msaa_passFunction · 0.85
renderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected