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

Method next_stream_

mlx/data/stream/Compose.cpp:16–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14 : stream_(stream), op_(op) {};
15
16bool Compose::next_stream_() const {
17 auto sample = stream_->next();
18 if (sample.empty()) {
19 return false;
20 }
21 composedStream_ = op_(sample);
22 if (!composedStream_) {
23 throw std::runtime_error(
24 "Compose: composer unexpectedly returned a nullptr stream");
25 }
26 return true;
27}
28
29Sample Compose::next() const {
30 // note: composedStream_ is read by many threads

Callers

nothing calls this directly

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected