| 128 | } |
| 129 | |
| 130 | StreamImpl* S(Stream s) { |
| 131 | if (s) return s; |
| 132 | Runtime& r = rt(); |
| 133 | std::lock_guard<std::mutex> lk(r.mu); |
| 134 | if (!r.legacy) r.legacy = make_stream(); |
| 135 | return r.legacy; |
| 136 | } |
| 137 | |
| 138 | /// The allocation that holds GPU address `p` (or CPU address `p` of a host allocation), with the offset into it. |
| 139 | const Alloc* find(const void* p, size_t* off) { |
no test coverage detected