MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / pop_front

Method pop_front

smallthinker/common/sampling.cpp:55–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 T pop_front() {
56 if (sz == 0) {
57 throw std::runtime_error("ring buffer is empty");
58 }
59 T value = data[first];
60 first = (first + 1) % capacity;
61 sz--;
62 return value;
63 }
64
65 const T & rat(size_t i) const {
66 if (i >= sz) {

Callers 3

pop_deferred_taskMethod · 0.45
start_loopMethod · 0.45
operator()Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected