| 75 | } |
| 76 | |
| 77 | ThreadLocalStream new_thread_local_stream(Device d) { |
| 78 | auto& [streams, mtx] = thread_local_streams(); |
| 79 | std::lock_guard lock(mtx); |
| 80 | int index = streams.size(); |
| 81 | return streams.emplace_back(index, d); |
| 82 | } |
| 83 | |
| 84 | Stream stream_from_thread_local_stream(ThreadLocalStream tls) { |
| 85 | static thread_local std::map<ThreadLocalStream, Stream> streams; |
no test coverage detected