MCPcopy Create free account
hub / github.com/ml-explore/mlx / new_thread_local_stream

Function new_thread_local_stream

mlx/stream.cpp:77–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77ThreadLocalStream 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
84Stream stream_from_thread_local_stream(ThreadLocalStream tls) {
85 static thread_local std::map<ThreadLocalStream, Stream> streams;

Callers 1

Calls 2

emplace_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected