coords: 3D coordinates. B x 3 log2T: logarithm of T w.r.t 2
(coords, log2_hashmap_size)
| 21 | return torch.cat(out, -1) |
| 22 | |
| 23 | def hashfunction(coords, log2_hashmap_size): |
| 24 | ''' |
| 25 | coords: 3D coordinates. B x 3 |
| 26 | log2T: logarithm of T w.r.t 2 |
| 27 | ''' |
| 28 | x, y, z = coords[..., 0], coords[..., 1], coords[..., 2] |
| 29 | return ((1<<log2_hashmap_size)-1) & (x*73856093 ^ y*19349663 ^ z*83492791) |
| 30 | |
| 31 | BOX_OFFSETS = torch.tensor([[i,j,k] for i in [0, 1] for j in [0, 1] for k in [0, 1]], |
| 32 | device='cuda') |
no outgoing calls
no test coverage detected