(self, device: torch.device)
| 1032 | self.directions_w = directions_w |
| 1033 | |
| 1034 | def to(self, device: torch.device) -> 'Ray': |
| 1035 | for attr_name in ['origins_w', 'directions_w']: |
| 1036 | arr = getattr(self, attr_name, None) |
| 1037 | if arr is not None: |
| 1038 | setattr(self, attr_name, arr.to(device=device)) |
| 1039 | return self |
| 1040 | |
| 1041 | def reshape(self, *shape: T.List[int]): |
| 1042 | self.origins_w = self.origins_w.reshape(*shape) |
no outgoing calls