| 70 | |
| 71 | |
| 72 | class dmap: |
| 73 | def __init__(self, map_location): |
| 74 | self.map_location = map_location |
| 75 | |
| 76 | def __enter__(self): |
| 77 | Tensor.dmap_callback = staticmethod(self.map_location) |
| 78 | return self |
| 79 | |
| 80 | def __exit__(self, type, value, traceback): |
| 81 | Tensor.dmap_callback = None |
| 82 | |
| 83 | |
| 84 | def _get_callable_map_location(map_location): |
no outgoing calls
no test coverage detected