(x, k)
| 184 | return idx.long(), dists.view(b, n, k) |
| 185 | |
| 186 | def fps(x, k): |
| 187 | b, n, _ = x.shape |
| 188 | x = x.view(-1, 3).contiguous() |
| 189 | offset = torch.full((b,), n, dtype=torch.long, device=x.device) |
| 190 | new_offset = torch.full((b,), k, dtype=torch.long, device=x.device) |
| 191 | offset = torch.cumsum(offset, dim=0).int() |
| 192 | new_offset = torch.cumsum(new_offset, dim=0).int() |
| 193 | idx = furthestsampling(x, offset, new_offset).long() |
| 194 | return idx |
nothing calls this directly
no outgoing calls
no test coverage detected