# Copyright © 2026 Christopher Snow.
# This displayed PyTorch example checks values on the CPU; it does not measure GPU time.
import torch
flags = (torch.arange(70) % 3 == 0).to(torch.int64)
offsets = torch.cumsum(flags, dim=0) - flags
print(offsets)
